ssh logging

Sofian Brabez sofian.brabez at wallix.com
Mon May 11 23:00:25 EST 2009


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


More information about the openssh-unix-dev mailing list