Surely it doesn't outbeat a per-server configuration as in other answers, but at least you won't have to add a configuration for all and every server you connect to! As seen above ssh didn't try to ask for a password for. It'll just use the first working key.Īlso you would only enter a passphrase if a given server is willing to accept the key. This way you don't have to specify what key works with which server. Here's how: $ cat ~/.ssh/configĭebug1: Next authentication method: publickeyĭebug1: Trying private key: /home/example/.ssh/id_rsaĭebug1: read PEM private key done: type RSAĭebug1: Authentications that can continue: publickeyĭebug1: Trying private key: /home/example/.ssh/id_rsa_old You can instruct ssh to try multiple keys in succession when connecting.
0 Comments
Leave a Reply. |