Yo peeps; I'm trying to set up some simple TCP connection's logging on my Linux box. Is there a simple script or something I can write and execute that will do something like execute "date >> html_logs/ssh.log && netstat -a | grep tcp
html_logs/ssh.log" every ten seconds or so?
I'm sure there are better alternatives to logging this, if you know any let me know. Thanx SigmaChi -- Registered Linux user #366862 Not that you care, but this message was sent from a 750MHz Athlon system running SuSE Linux 9.1 (Kernal 2.6.5) and KMail 1.62. I aslo run Red Hat Linux 8.0 (Kernal 2.4.18), Debian GNU/Linux 3.0 (Kernal 2.2.20), Mandrake Linux 9.2 (Kernal 2.4.22), and YellowDog Linux 3.0 (Kernal 2.4.20) on various systems and architectures for various reasons. Yeah, and there's a old Mac OS in there somewhere that I use as a bootloader for Linux, and a Windows XP box used as a router for my Linux-based network, but they don't count, 'cuz they aren't "real" OS's. Who me? Biased? Nah! "Failure is not an option with Microsoft; it's bundled with the software!"
On Tuesday 09 November 2004 16:04, Eric Scott wrote:
Yo peeps; I'm trying to set up some simple TCP connection's logging on my Linux box. Is there a simple script or something I can write and execute that will do something like execute "date >> html_logs/ssh.log && netstat -a | grep tcp
html_logs/ssh.log" every ten seconds or so?
Doesn't that work? I assume from the file name that you want to log incoming ssh connections. sshd already logs connections to the syslog, so you get the log messages in /var/log/messages, and the suse firewall logs the incoming connections to that file as well if you start it. That would be the simplest way to log, IMHO, just use what is already there.
participants (2)
-
Anders Johansson
-
Eric Scott