Cisco IOS public-key auth with privilege 15 and no password

authenticationciscossh

From IOS 15 we can log on Cisco IOS with RSA public key authentication.

However we still have to assign a password to the user. If we don't the user can log on without any password (and without the private key).

That means that the password can still be brute-forced.

What I'm looking for is a way for users to log on to the switch with privilege 15 without entering any password and totally disabling the password authentication for those users.

Is it possible?

I found for example (among others) this answer on Cisco forums that says it isn't possible but I hope that 5 years latter a solution has been found to this security issue.

Best Answer

This works on 2960x software 152-7.E4:

ip ssh version 2
no ip ssh server algorithm authentication password
no ip ssh server algorithm authentication keyboard
line vty 0 15
transport input ssh

This should remove telnet login also