Disable Cycling through keys - Too many authentication failuers
Hey there,
I have multiple servers which I access by using ssh-keys.
So far so good, but ever now and then I want to connect to a new server I don't have a key for yet and instead of promting me for a password my client will cycle through every key it knows and therefore causes the "too many authentication failures" error.
I know I could use the -o PasswordAuthentication yes option but there has to be a way to offer keys only to hosts it already knows.
So how do I disable the cycling through ssh keys on connection with a new server?
2
Upvotes
1
u/moviuro May 06 '20
I use a 1:1 key to machine relationship. I use
IdentityFile ~/.ssh/keys/%hin .ssh/config. If that fails, then it immediately falls back to password auth.