When connecting via SSH my terminal wants to use id_rsa by default. I don't want to use that key for this particular server. So I am forced to specify the proper key path when connecting:
This works to connect: ssh -i /Users/myuser/.ssh/mykey serveruser@server.com
But I would prefer to use the following to connect: ssh user@server.com
My Question: Is there a way to indicate in known_hosts or other config that SSH should use the key located at /Users/myuser/.ssh/mykey when serveruser is connecting to server.com?
Thanks!
ssh
? It is then a straightforward task to scan the parameters and add the extra parameter to use the other key when connecting toserver.com
.