ssh logging

Sofian Brabez sofian.brabez at
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.



Sofian Brabez - sbz at

Pôle Produits / Security Research and Development
WALLIX, 118 Rue de Tocqueville 75017 Paris

More information about the openssh-unix-dev mailing list