M BUZZ CRAZE NEWS
// news

How to log all ssh sessions?

By Sarah Rodriguez

I'm Ubuntu 18 user for some days. Previously I used Putty in Windows and it logs all my commands in SSH: Documents/Logs/2018-11-01_20-00-03_sshserver.log etc.

Now I need to setup logging in Ubuntu terminal too because I'm using terminal (putty doesn't know copy/paste to another app/window).

Can anybody tell me how to turn on logging?

Thank you very much.

5

1 Answer

You could use the script command. Read man script.

script my.log
ssh A A stuff exit # on A
ssh B B stuff exit # on B
exit # end of script my.log
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy