By chassnider
This appears daily in logwatch under PAM. Is there anyway to prevent it? I already have configured sshd to prevent root login, and use fail2ban.
unknown (210.66.73.143): 189 Time(s) root (222.186.38.109): 75 Time(s) root (220.177.198.26): 74 Time(s) root (220.177.198.43): 55 Time(s) root (115.239.248.51): 50 Time(s) root (115.239.248.61): 50 Time(s) root (117.21.191.210): 50 Time(s) root (117.21.191.35): 50 Time(s) root (117.21.226.64): 50 Time(s) root (202.109.143.35): 50 Time(s)
I guess I could switch login to certificate only, but that limits how I can access my server.
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!
Personally the first thing I do one all my servers is to disable password logins and only connect using SSH key pairs. Disabling root login, which you’ve already done, is also a good step. Many people also change the port that the SSH daemon listens on from port 22 to something else.
You could set IP table rules that will drop all connections to your SSH port except from specific IP addresses. Though that obviously limits where you can log in from. Setting up port knocking is another option.
You might also just want to tweak your fail2ban configuration to be a bit more aggressive. Check out these tutorials for more information on fail2ban:
Thank you Andrew.
Is it possible to block all traffic from China? Does anyone recommend that?
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.