Dear All, I am a newbie in the unix world. I have a problem. I try to log all my typed, edited (via vi/vim) and of course the output/result of a command into a file (specific file e.g.: hostname_date_time.log into my home directory). I would like to reach the same logging what the putty does. But I do not want to use putty under linux. This is why I ask you is it possible to logging the ssh as the putty? I read the related man pages and look after my problems in the net as well (forums, etc). Unfortunately I have found nothing for my problem. :( Secondly the Logging levels info, debug, verbose ... there is no description in the man. Which level logs what. If it is possible can you please send me a detailed description about it? If it is not possible to log. Does it have chance that the ssh will contain this option as well? I would like to thank you in advance for your kind help and time as well. Regards,Bal?zs Moln?re-Mail:molnarb81 at hotmail.com _________________________________________________________________ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx
On Tue, May 05, 2009 at 10:59:32AM +0200, Bal?zs Moln?r wrote:> Dear All, > > I am a newbie in the unix world.Welcome aboard.> I have a problem. I try to log all my typed, edited (via vi/vim) and > of course the output/result of a command into a file (specific file e.g.: > hostname_date_time.log into my home directory).Typically, Unix tools are cooperative rather than comprehensive. In this particular case, OpenSSH does not provide keystroke logging. Instead, the typical way to do this is to have a separate program do the logging. One such program is script(1). You invoke it before running the program that you want to record the output of. Depending on your platform, script may have an option to invoke the command directly, in which case you could do what you describe with something like #!/bin/sh host=$1 datetime=`date '+%y-%m-%d_%H-%M'` script -c "ssh $host" ${host}_${datetime}.log [...]> Secondly the Logging levels info, debug, verbose ... there is no > description in the man. Which level logs what.The logs that you describe are for diagnostic purposes, which is to say that they do not record keystrokes. The possible values are listed in sshd_config(5) in order from least verbose to most verbose but the only way to know what the possible outputs are is to check the source code. [...] -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
On Tue, May 05, 2009 at 10:59:32AM +0200, Bal?zs Moln?r wrote:> > Dear All, > > I am a newbie in the unix world.Welcome in the Unix wonderful world :)> > I have a problem. I try to log all my typed, edited (via vi/vim) and of course the output/result of a command into a file (specific file e.g.: hostname_date_time.log into my home directory). >You can use tee(1) piped in you ssh command like this to log commands results: ssh user at host | tee "`hostname`_`date '+%Y%m%d_%H:%M:%S'`.log Have a look to [1] about ssh session recording> I would like to reach the same logging what the putty does. But I do not want to use putty under linux. > This is why I ask you is it possible to logging the ssh as the putty? > > I read the related man pages and look after my problems in the net as well (forums, etc). > Unfortunately I have found nothing for my problem. :( > > Secondly the Logging levels info, debug, verbose ... there is no description in the man. Which level logs what. >Look to sshd_config(5) man page, you can change Logging level in your ssh server config file (/etc/sshd/sshd_config) and with flag -v on client side. Regards [1] http://www.jms1.net/ssh-record.shtml -- Sofian Brabez - sbz at wallix.com P?le Produits / Security Research and Development http://www.wallix.com WALLIX, 118 Rue de Tocqueville 75017 Paris