11

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
Martin
  • 236

1 Answers1

4

Your ssh client is definitely presenting your RSA key to the remote ssh:

debug1: Offering RSA public key: /home/martin/.ssh/id_rsa
debug1: Authentications that can continue: publickey

But for some reason the remote server declines it. The reason can be determining by reviewing it's logs, regardless of what you think about it.

drookie
  • 9,120
  • 1
  • 21
  • 29