1
votes

I'm trying to connect to an embedded board of mine through ssh. But upon trying to connect through ssh -v -l root [email protected], I get a series of debug comments:

dico@lithya:~$ sudo ssh -v -l root dico@foxboard2

OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: /etc/ssh/ssh_config line 22: Applying options for *

debug1: Connecting to foxboard2 [10.251.145.180] port 22.

debug1: Connection established.

debug1: permanently_set_uid: 0/0

debug1: identity file /root/.ssh/id_rsa type -1

debug1: identity file /root/.ssh/id_rsa-cert type -1

debug1: identity file /root/.ssh/id_dsa type -1

debug1: identity file /root/.ssh/id_dsa-cert type -1

debug1: identity file /root/.ssh/id_ecdsa type -1

debug1: identity file /root/.ssh/id_ecdsa-cert type -1

debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-6

debug1: match: OpenSSH_5.5p1 Debian-6 pat OpenSSH*

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1

debug1: SSH2_MSG_KEXINIT sent

debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none

debug1: kex: client->server aes128-ctr hmac-md5 none

debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

debug1: SSH2_MSG_KEX_DH_GEX_INIT sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY

debug1: Server host key: RSA 18:14:33:1e:88:5f:ad:13:78:9f:36:10:b9:d2:27:e4

debug1: Host 'foxboard2' is known and matches the RSA host key.

debug1: Found key in /root/.ssh/known_hosts:1

debug1: ssh_rsa_verify: signature correct

debug1: SSH2_MSG_NEWKEYS sent

debug1: expecting SSH2_MSG_NEWKEYS

debug1: SSH2_MSG_NEWKEYS received

debug1: Roaming not allowed by server

debug1: SSH2_MSG_SERVICE_REQUEST sent

debug1: SSH2_MSG_SERVICE_ACCEPT received

debug1: Authentications that can continue: publickey,password

debug1: Next authentication method: publickey

debug1: Trying private key: /root/.ssh/id_rsa

debug1: Trying private key: /root/.ssh/id_dsa

debug1: Trying private key: /root/.ssh/id_ecdsa

debug1: No more authentication methods to try.

Permission denied (publickey,password).

The connection is being established through port 22 so that isn't the problem. So, clearly there is a problem with public/private key authentication. Therefore, how can I make sure that the private/public keys through both my machine and the board are in sync? Or better yet, how do I solve this issue or completely remove any keys?

UPDATE

I've tried to connect to the board by specifying no public key authentication by ssh -o PubkeyAuthentication=no dico@foxboard2, but now it's asking me for a password. I've checked the site but the password I type is incorrect. How can I remove a password request?

2
It's attempting authentication with your public key, against root's private key and is failing. To fix this problem, the contents of your ~/.ssh.id_rsa.pub file needs to be appended to /root/.ssh/authorized_keys on the server you're trying to connect to. Doing this requires that you already have some way to connect as root or can have someone do it for you.Terry Carmen

2 Answers

2
votes

You can copy your public key to the server using:

ssh-copy-id [email protected]

It is always better to use keys than passwords.

0
votes

Make sure your ~/.ssh directory is set to mode 700 (chmod 700 ~/.ssh) and your ~/.ssh/authorized_keys is set to mode 600 (chmod 600 ~/.ssh/authorized_keys).

In your /etc/ssh/sshd_config file set PasswordAuthentication no to turn off password logins.