How can I log all attempts to ssh onto my Dreamhost server? Or if the log already exists where is it? I checked logs/example.com/html/ I cannot find any log file for the ssh logins.
I want to see when all failed attempts or successful attempts to SSH in my server happen.
On Dreamhost (and other hosts/servers that have not explicitly disabled the “last” command), you can get a list of all recent login attempts using:
The first command will give you your login history for the current month, while the second will give you your login history for the prior month.
See the Dreamhost Wiki for more: http://wiki.dreamhost.com/Troubleshooting_Hacked_Sites