Wednesday, August 15, 2007

Log Telnet and FTP Sessions in Log File

For security reasons, you might opt to log telnet and FTP sessions. On my box, those sessions are logged into the /var/adm/messages file. To make this change, you will have to modify the /etc/rc2.d/S72inetsvc script. Here's an example.

Go to the bottom of this file and look for this line, /usr/sbin/inetd -s &

# vi /etc/rc2.d/S72inetsvc
...
/usr/sbin/inetd -s &

Change to /usr/sbin/inetd -s -t &
: wq!

You will have to recycle the inetd daemon.

1 comment:

Anonymous said...

eh? not "turn off telnet and use ssh instead, say with putty.exe for windows clients" ?? Maybe refer everybody to the Bastille utility?