I'm trying to connect to a remote SSH server using a private key at ~/.ssh/id_rsa
. When I ssh -v
to the server I get the following:
...
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/martin/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Offering RSA public key: martin@martin
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/martin/.ssh/id_dsa
debug1: Trying private key: /home/martin/.ssh/id_ecdsa
debug1: Trying private key: /home/martin/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).
Looking at the output, it seems like it's not even trying my private key. I've tried editing ~/.ssh/config, using the -i
option, adding the key via ssh-add
, and nothing's working.
I'm positive that the public key is properly installed at the remote server. Anyone can help me?
Edit:
martin@martin:~/.ssh$ ls -la
total 20
drwx------ 2 martin martin 4096 feb 26 09:44 .
drwxr-xr-x 41 martin martin 4096 feb 26 09:37 ..
-rw------- 1 martin martin 1766 feb 25 16:31 id_rsa
-rw-r--r-- 1 martin martin 409 feb 25 16:31 id_rsa.pub
-rw-r--r-- 1 martin martin 540 feb 26 09:46 known_hosts