Not sure exactly how to word the question and therefore cannot find anything about it on Google, but is there a way (in Ubuntu 12.04 - 14.10) to record any failed login attempts that occur over ssh? I’m aware that these sorts of logs are made as my droplet gets attacked every few seconds when fail2ban isn’t enabled, but is there a way of seeing what sort of passwords are being guessed? For example, if my password is abc123, I’ll want to change it as soon as possible if they’re guessing abc122 but can relax a little if !@!@!@! is what’s being guessed. Please let me know if you know how to do this sort of thing, as I’m really curious as to what the bots are trying. For all I know, they could be very close to guessing what I view as a very secure password.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
For security reasons sshd does not log the password being used. This is to prevent your legitimate password from being logged if you missed a case, or added a space.
With a standard installation of openssh-server this is not possible and would not generally be recommended as any solution would likely log successful passwords as well and if that could be avoided it would still log legitimate failed attempts (if you were to mix up two characters of your password). That being said I was able to locate a discussion on just this topic on the Ubuntu forums that includes a link to a patch for the ssh server which should make this possible.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.