Re: SSH command logging

Frequent Advisor

SSH command logging


I have a products that connects to my servers remotely (ssh) and executes commands.

I have a filling the product does something nasty...

I tried running script (command) inside .basrc but I get an infinite loop, starting a new bash inside bash make the product stuck.

Is there a way to log commands that are being executed remotely via ssh ?

The server is windows and my clients are RedHat Linux (4.8-5.5).

Thanks ahead,
Lucifer Megacruel
Valued Contributor

Re: SSH command logging

Try Snoopy Logger :


"To Denouce the Evils of Truth and Love. To cause may hem and destruction and necromancy , Lucifer is here"
Valued Contributor

Re: SSH command logging


ssh @

try this.
Frequent Advisor

Re: SSH command logging

Isn't there any system command for that ?
Michael Steele_2
Honored Contributor

Re: SSH command logging

sshd_config must be modified to enable SyslogFacility (normally auth) and LogLevel must be set to VERBOSE. These settings enable syslog to log the fingerprints of the key pair used for access.

This functionality is enabled by setting an option in the public key:
command="/root/bin/sshroot" ssh-dss AAAAB3NzaC1kc3MAAACBALKnuTrmoeO6X1TI6gWSq5ysxx [[ LOTS snipped ]]

From forum member DKOLeary.

You want to read the attaced, towards the bottom - Required/suggested modifications:
Support Fatherhood - Stop Family Law