0

I've installed a Raspbian system, and would like to ssh to it using my private key. I use this key with other servers too, thus I'm sure chmod is set up well locally.

When I try to ssh to the Raspbian this happens:

debug1: SSH2_MSG_NEWKEYS received
debug2: key: /home/nagyviktor/.ssh/id_rsa (0x55c3847112d0), agent
debug1: Skipping ssh-dss key /home/nagyviktor/.ssh/id_dsa - not in PubkeyAcceptedKeyTypes
debug2: key: /home/nagyviktor/.ssh/id_ecdsa ((nil))
debug2: key: /home/nagyviktor/.ssh/id_ed25519 ((nil))
debug3: send packet: type 5
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/nagyviktor/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/nagyviktor/.ssh/id_ecdsa
debug3: no such identity: /home/nagyviktor/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/nagyviktor/.ssh/id_ed25519
debug3: no such identity: /home/nagyviktor/.ssh/id_ed25519: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password

What should I change in my config to make the rsa key accepted?

  • 2
    packet type 51 is SSH2_MSG_USERAUTH_FAILURE. You need to look at the logs on the server side to see why your key is not accepted. All the client will see is that it is not accepted. – user4556274 Jun 8 '17 at 19:34
0

The key was rejected. That means you didn't set it up correctly on the server side. The easiest thing to do is

ssh-copy-id user@raspberry-ip

If you want to manually check the configuration, have a look into the owner and the permissions of all home directory, ~/.ssh/ directory and the authorized_keys file in there.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.