Results 1 to 10 of 10
Hey I want to make sshd log its activity in a file called /home/sshd<username>.log directory/file. I was wondering if anyone could emial me a sshd log script they made up ...
- 03-17-2009 #1
How do I log ssh activity?
Hey I want to make sshd log its activity in a file called /home/sshd<username>.log directory/file. I was wondering if anyone could emial me a sshd log script they made up or can even push me toward a cool place to read up on how to program sshd. Anyways I would even be happy just know which ip addresses have touched port 22 if anyone knows a cool program I could add to linux to do something like that I would be deeply in depted to you. thankyou my user account is linuxrelik here and I think private mail is set to tell me when I get private mail by email. If you really would like to send me a cool email my email address is eric_justin_allan@cfl.rr.com
- 03-17-2009 #2
Are you referring to something similar to the output of "last" or "lastb"?
- 03-17-2009 #3
I want to log everthing I can detect on port 22
I want to log everything I can detect on port 22 to a file in the /home directory.
- 03-17-2009 #4Just Joined!
- Join Date
- Mar 2009
- Posts
- 8
Isn't the data you're looking for already in /var/log/secure?
- 03-17-2009 #5
I dont know
Im not exactly sure everything you can monitor
on sockets. but thats a pretty neet log file.
thanks for the tip.
- 03-17-2009 #6Shows log of non-local logins with IP and name resolution.Code:
last -d
Not sure I understand what you are really looking for: To log the actual content of an ssh connection, or the fact it occurred, or the IP the connection originated from.
Otherwise, start with /etc/init.d/ssh ....?
- 03-18-2009 #7
I guess I need to download a program for it.
I prolly should wait till I go to school for networking and programming cause thats kind of what I am asking somone to tell me. heh hey anyone wanna post a c program that makes a log file and prints the activity on a network card to the log file? thanks for the last -d command also that helps alot.
- 03-18-2009 #8Just Joined!
- Join Date
- Sep 2007
- Location
- Lafayette, IN
- Posts
- 83
Do you mean something like tcpdump?
- 06-10-2010 #9Just Joined!
- Join Date
- May 2010
- Posts
- 5
I think this is what he means. A log file that mirrors, exactly, the activity through a ssh connection.
for example:
and i too, am wondering how to do this task.Code:username@local_hostname:~$ ssh remote_hostname username@remote_hostname's password: Linux remote_hostname 2.6.32-22-generic-pae #36-Ubuntu SMP Thu Jun 3 23:14:23 UTC 2010 i686 GNU/Linux Ubuntu 10.04 LTS Welcome to Ubuntu! * Documentation: https://help.ubuntu.com/ System information as of Wed Jun 9 23:08:08 CDT 2010 System load: 0.0 Swap usage: 0% Users logged in: 0 Usage of /home: 0.0% of 16.66GB Temperature: 40 C Memory usage: 13% Processes: 119 Graph this data and manage this system at https://landscape.canonical.com/ The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Jun 9 22:49:34 2010 from remote_hostname.info Could not chdir to home directory /home/username: No such file or directory username@remote_hostname:/$ cd /etc username@remote_hostname:/etc$ cd apache2 username@remote_hostname:/etc/apache2$ dir apache2.conf envvars magic mods-enabled sites-available conf.d httpd.conf mods-available ports.conf sites-enabled username@remote_hostname:/etc/apache2$ cd .. username@remote_hostname:/etc$ cd .. username@remote_hostname:/$ cd /home username@remote_hostname:/home$ cd / username@remote_hostname:/$ sudo -i mkdir this_is_what_he_means [sudo] password for username: username@remote_hostname:/$ dir bin cdrom etc initrd.img lib mnt proc sbin srv tftpboot usr vmlinuz boot dev home initrd.img.old media opt root selinux sys tmp var vmlinuz.old username@remote_hostname:/$
- 06-10-2010 #10Just Joined!
- Join Date
- May 2010
- Posts
- 5
actually script works great.
but it only logs yourself, not if, for example, i have an open SSH server and user 'jane' logs in, i'm not going to see the activity.




