I have turned on the remote login in system-preference, but I got this when I try to connect my mac from from my ubuntu. Any ideas?

$ ssh -vvv lakeat@
OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /home/danny/.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 [] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/danny/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/danny/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/danny/.ssh/id_rsa-cert type -1
debug1: identity file /home/danny/.ssh/id_dsa type -1
debug1: identity file /home/danny/.ssh/id_dsa-cert type -1
debug1: identity file /home/danny/.ssh/id_ecdsa type -1
debug1: identity file /home/danny/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9
debug1: match: OpenSSH_5.9 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.1
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "" from file "/home/danny/.ssh/known_hosts"
debug3: load_hostkeys: loaded 0 keys
debug1: SSH2_MSG_KEXINIT sent
Connection closed by
  • Are both machines on the same network? No firewalls in between? – Bart Doe Oct 14 '13 at 21:22

Looking at the output there seems to be some problem with your RSA keys. I did look up this and read a comment over at Superuser: https://superuser.com/questions/408565/i-am-getting-this-error-ssh-exchange-identification where they talk about, that you have to allow your user to log-in, inside the sshd_config file on the computer you are connecting to (in your case your OSX computer):

sudo nano /etc/sshd_config
AllowUsers yourname@*

I've never encountered this problem myself but it's worth a shot in my opinion.

  • On my mac or my Ubuntu? – Daniel Oct 14 '13 at 19:53
  • It's on the OSX one (the one you connect to). Clarification edit done in answer. – Hoshts Oct 14 '13 at 20:01
  • I tried, but to no avail. Same error msg as before – Daniel Oct 14 '13 at 20:08
  • You could try the first comment on the post by switching to type 2 RSA key with adding -2 to the ssh call : ssh -2 ... – Hoshts Oct 14 '13 at 20:13
  • I end up with the same message with "ssh -2 -vvv lakeat@" – Daniel Oct 14 '13 at 20:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .