-1

I switched all my servers to ssh publickey login and disabled password login about a week ago (root login IS still enabled). I also run Fail2ban and logwatch.

Why is there still login attempts showing up in the logs? I admit the number of attempts is down to low double digits, but shouldn’t there basically be none? Are there bots actually trying to brute force a key that makes no sense? Or my guess I have something configured incorrectly?

Serves are Ubuntu 18.04 and Debian 10 both up to date.

EDIT: For future reference this question pertains more to the logging of login attempts then the security there of.

Jason Croyle
  • 101
  • 5
  • 2
    "and disabled password login" - how exactly did you do this. Please try to login with ssh -v ... and check what the lines debug1: Authentications that can continue: .... say, i.e. if they only show publickey or if they also list password. – Steffen Ullrich Apr 07 '21 at 20:25
  • I'm confused. Changing login types does not prevent bots trying to log in. They will just give up a lot faster. And, as Steffen says, this is super easy to test: just try to log in with a password and see what the logs say. – schroeder Apr 08 '21 at 07:51
  • Thank you everyone I appreciate the information and it does make sense the server can reject the attempt until it is received I was under the assumption ssh wouldn’t even allow the attempts. – Jason Croyle Apr 08 '21 at 14:12