PDA

View Full Version : Track SSH logins


martinmaurer
January 24th, 2007, 09:10 AM
hi,

I want to log all successful ssh connection

- username
- ip address
- time
- all command typed (a kind of bash history)
- etc.

anyone know how to do this? the same for local logins.

any help is welcome,
martin

MrHorus
January 24th, 2007, 09:40 AM
hi,

I want to log all successful ssh connection

- username
- ip address
- time
- all command typed (a kind of bash history)
- etc.

anyone know how to do this? the same for local logins.

any help is welcome,
martin

The auth log in /var/log should show you the username, time and IP address of all login attempts, successful or otherwise.

As for command history, .bash_history in the user's home dir will have this although it can be deleted by the user.