Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-11-2007, 07:47 PM   #1
LQ Newbie
Registered: Aug 2007
Location: Mexico DF
Distribution: Debian and Fedora
Posts: 21

Rep: Reputation: 15
ssh record executed commands???

Hi all!!

Thanks for your time...

SSH record executed commands in the remote machine???
Where?? some guide or something to read pls...

Thanks in Advance
Old 09-11-2007, 08:20 PM   #2
Senior Member
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,196

Rep: Reputation: 105Reputation: 105
That's a little unclear.

When you ssh to the remote machine, you are executing commands in the shell on the remote machine. You can certainly have the shell keeping a history on the remote machine. I use ksh. The history file is .sh_history in my home directory. I use "set -o vi" to get vi keystroke editing of the history file. So when I'm at the command line, esc k gets me the last command, etc.

On the other hand, you might be asking how your local machine might record the commands that you execute on the remote machine. I don't think there is any way of doing that. If you had keystroke logging, you would basically have to emulate your shell on the remote system to put the keystrokes together into the commands, accounting for back spaces, vi editing keystrokes, etc.

A totally different viewpoint is the scrollback on your terminal window. I've set that to essentially unlimited on my desktop computer. So, even after I've logged out or even shutdown the remote machine, I can scroll back through my window and see what I did.

Hope that helps at least to clarify the scope of your question.
Old 09-12-2007, 08:55 PM   #3
LQ Newbie
Registered: Aug 2007
Location: Mexico DF
Distribution: Debian and Fedora
Posts: 21

Original Poster
Rep: Reputation: 15
Clarify the question i hope.

My boss, say to me SSH store a log, of all commands executed, via SSH... in the local host..

I want know if this information is true, and where store this logs...

Your Information, is very useful.
Old 05-13-2009, 09:30 AM   #4
LQ Newbie
Registered: May 2009
Posts: 1

Rep: Reputation: 0
Found something that does just this

I know this is an old thread but thought I would leave this message for anyone that is following in my path. I was given the requirement to do the same as above but log it to a separate server for audit. We found Snoopy which is a small library that sends all commands run via the command line to syslog tagged as secure then we just send the secure logs to a machine separate from our main syslog server

http: //
Old 05-13-2009, 10:05 AM   #5
Registered: Feb 2009
Posts: 63

Rep: Reputation: 16
Snoopy is kinda old. There's way more current methods & tools.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
View commands being executed in Xwindows DMeerholz Linux - Software 1 06-20-2007 07:40 AM
Many commands using ssh Corrado Linux - General 4 05-10-2007 01:05 AM
at - warning: commands will be executed using /bin/s RGummi Linux - General 4 10-13-2006 12:34 PM
Commands executed at boot time Johnburrell Linux From Scratch 3 09-18-2005 01:56 PM
problems with X-apps when executed on remote host via ssh numerous Linux - Software 1 01-17-2005 07:08 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:14 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration