I have an account on a remote server. I log in to the account using Remote Viewer in Ubuntu, or sometimes with ssh.
How can I log the IP each time someone logs in to my account on the remote server? Is it possible to make a script in the account?
|
I have an account on a remote server. I log in to the account using Remote Viewer in Ubuntu, or sometimes with ssh. How can I log the IP each time someone logs in to my account on the remote server? Is it possible to make a script in the account? | ||||
|
feedback
|
|
The IP address is most probably already being logged. You haven't given any info on what the remote server really is; you mentioned ssh, so I'm going to assume it's a Linux server. Linux logs login attempts to syslog. It depends on the distribution on where in particular the log messages you're interested in go, but they are almost certainly somewhere in /var/log, and there's a good chance they go to /var/log/messages. You can find the right file by grepping all files in /var/log for the name of the right program, for example:
Note that the logger daemon needs to be started at boot for logging to work (most probably it is, but some distros don't enable it, like Gentoo). | |||
|
feedback
|