Created
June 30, 2021 18:00
-
-
Save alsunseri/61b365be82811f5d5c72001a2811943d to your computer and use it in GitHub Desktop.
fix for ssh "too many authentication failures"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If ssh on - for example, Debian - starts failing to log into a server even though you know you have the right key. | |
Also works when you intend to use a password but ssh client fails before allowing that method. | |
You can tell the ssh client to ignore the default identity files and only attempt one specific file. | |
$ ssh -o 'IdentitiesOnly=yes' -i ~/.ssh/correct_id_file user@host | |
IdentitiesOnly | |
Specifies that ssh(1) should only use the authentication identity and certificate files explicitly configured | |
in the ssh_config files or passed on the ssh(1) command-line, | |
even if ssh-agent(1) or a PKCS11Provider offers more identities. | |
The argument to this keyword must be yes or no (the default). | |
This option is intended for situations where ssh-agent offers many different identities. | |
... | |
IdentityFile may be used in conjunction with IdentitiesOnly to select which identities in an agent are offered during authentication. | |
IdentityFile may also be used in conjunction with CertificateFile in order to provide any certificate also needed for authentication with the identity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment