0

I connect to server A (running OpenSSH server in Linux OS) using Putty:

localhost% putty.exe A

How to cause the SSH server to log the commands sent from localhost in unencrypted manner. Thanks

rok
  • 159
  • 8

1 Answers1

2

I'm not sure I got the question right: You want to log all commands issued in a SSH session?

I'd suggest using auditd for that. Don't forget that once a user becomes root, local logs will not do you any good and can be forged. So combining this with a syslog server might be a good idea, depending on your requirements.

See these links:

Documentation for auditd

Make auditd record commands issued as root with the userid sudo or su was run as:

Getting auditd to record the original user

fuero
  • 9,591
  • 1
  • 35
  • 40