Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a report of Users SSHing to other servers

Status
Not open for further replies.

kozlow

MIS
Mar 3, 2003
326
US
Does anyone have a script that will report Users SSHing to other servers?

I am trying to find out if wtmp/btmp keeps track of users signing on to other servers...

We are creating a Centrilized Management Server and looking for a way to keep track of use.

This seems pretty straight forward... Thanks in advance.
 
wtmp/btmp only tracks stuff happening on the local server.

I would create a wrapper for the ssh binary to do something like this, e.g.

Code:
#!/usr/bin/ksh

echo "$(date): user $LOGNAME executed: $@" >> /var/log/ssh.log

exec /usr/bin/ssh.orig "$@"

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top