I have generated private-public pair of ssh keys using e.g. this. I don't have access to the remote server, so I sent the public key to someone that possess an account there.
The public key was placed in the directory ~/.ssh/authorized_keys
. Now I want to access using my private keys:
ssh -i ./authorized_keys/id_rsa usr@location
or
ssh usr@location
requests the usr
password and does not pick the public key. How can I fix this? Verbose mode says that it can use the key, but it doesn't use it (tail of the output using the first option)
...
debug1: Next authentication method: publickey
debug1: Offering public key: .ssh/authorized_keys/id_rsa RSA SHA256:XXX/XXXXXXXX explicit agent
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: password