SSH from Ubuntu 14.04 to Synology NAS not working

May 22, 2014 5.1k views
Hi all, I've setup a new droplet running 14.04 and want to SSH to my NAS without password. This is something I've setup on all my servers, other servers run 12.04 and are able to connect to my NAS. I've generated RSA private and public keys on my server and added the public key to my NAS. The server IP has also been granted access to port 22. When connecting the following error occurs: ssh_exchange_identification: read: Connection reset by peer Adding -vvv generates this: OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 debug1: Reading configuration data /root/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug2: ssh_connect: needpriv 0 debug1: Connecting to ipofnas [ip] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug3: Incorrect RSA1 identifier debug3: Could not load "/root/.ssh/id_rsa" as a RSA1 public key 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: identity file /root/.ssh/id_ed25519 type -1 debug1: identity file /root/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 ssh_exchange_identification: read: Connection reset by peer The openssh version on 14.04 differs from the one on 12.04 Any ideas? Cheers, Jaap
4 Answers
Can you currently SSH into the NAS from any other machine? It sounds to me like it might be an issue on the NAS end. Have you tried restarting it?
Hi Andrew,

I have no troubles connecting to my NAS from other machines. 3 other droplets running 12.04 are able to connect just fine.
Do you have a firewall installed on the NAS? If so, make sure your droplet is whitelisted.
You can chech that by running:
telnet 1.2.3.4 22

where 1.2.3.4 is your NAS server's IP address.
Hi Kamal,

Yes, my droplet is whitelisted.
Have another answer? Share your knowledge.