I am trying to make a more streamlined means to establish an SSH client connection to a remote server. I have created a public/private keypair and used ssh-copy-id
to install the public key onto the remote server.
However, it still was asking for the password unless I put in the path for the identity file with something like ssh -i ~/.ssh/mykey user@host
. Should I have to type this to bypass the password with public key authentication?
To bypass this I used .bashrc
and created an alias using this path. However, is this the way to do this? Or is it just a question of the server allowing the public key so I can just use the usual ssh user@host
?