Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I try to ssh to a remote host, I get the following error messages:

root@cloudstack-server-1:~/.ssh# ssh [email protected] -v
OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 172.17.4.17 [172.17.4.17] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-1024
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type 2
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
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.9p1 Debian-5ubuntu1.1
debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.1
debug1: SSH2_MSG_KEXINIT sent
Read from socket failed: Connection reset by peer

BTW, I generate a key-pair id_rsa/id_rsa.pub in my local host and paste the id_rsa.pub to the remote host's file authorized_keys. I also enable password login in remote host. Now, I have no idea about the error messages--Read from socket failed: Connection reset by peer. Please give me some advices.

share|improve this question
    
Can you read the sshd log at remote server? It should contain some information why you cannot connect. –  Tero Kilkanen Mar 12 at 4:06
    
Can you try ssh-copy-id [email protected] and enter password on prompt. –  Ketan Mar 12 at 4:11

1 Answer 1

This is almost certainly a permission problem on the server side. Assuming you have some other way of connecting to it (I would not know how you pasted your public key in their otherwise), check the sshd log file ( /var/log/auth.log but depending on your configuration file).

The log should point you in the right direction, but in particular you should set the permissions of ~ubuntu/.ssh on the server to 700 with owner ubuntu. It could also be the permissions of the files in ~ubuntu/.ssh. Or on /etc/ssh or the files in there (which would mean other accounts on the server should have the same ssh login problems).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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