ssh not working

Hi,

The openssl libraries on my MacOS X 10.4.1 machine (/usr/lib/libcrypto.0.9.7.dylib and /usr/lib/libssl.0.9.7.dylib) got deleted due to a user error.

I cannot seem to find my older CD/DVD of MacOS 10.4. I only have DVD for 10.4.6. So I tried restoring these by compiling openssl 0.9.7b and placing them in the /usr/lib locations. After this, the sshd started. But I get the following error when clients try to connect to it -

OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to hostname [ip.ip.ip.ip] port 22.
debug1: Connection established.
debug1: identity file /home/xxxx/.ssh/identity type -1
debug1: identity file /home/xxx/.ssh/id_rsa type -1
debug1: identity file /home/xxx/.ssh/id_dsa type -1
debug1: loaded 3 keys
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1
debug1: match: OpenSSH_5.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2 MSGKEXINIT sent
debug1: SSH2 MSGKEXINIT received
debug2: kex parsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
debug2: kex parsekexinit: ssh-rsa,ssh-dss
debug2: kex parsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex parsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex parsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac- md5-96
debug2: kex parsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac- md5-96
debug2: kex parsekexinit: none,zlib@openssh.com,zlib
debug2: kex parsekexinit: none,zlib@openssh.com,zlib
debug2: kex parsekexinit:
debug2: kex parsekexinit:
debug2: kex parsekexinit: first kexfollows 0
debug2: kex parsekexinit: reserved 0
debug2: kex parsekexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie- hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex parsekexinit: ssh-rsa,ssh-dss
debug2: kex parsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex parsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex parsekexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.co m,hmac-sha1-96,hmac-md5-96
debug2: kex parsekexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.co m,hmac-sha1-96,hmac-md5-96
debug2: kex parsekexinit: none,zlib@openssh.com
debug2: kex parsekexinit: none,zlib@openssh.com
debug2: kex parsekexinit:
debug2: kex parsekexinit:
debug2: kex parsekexinit: first kexfollows 0
debug2: kex parsekexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2 MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
debug1: expecting SSH2 MSG_KEX_DH_GEXGROUP
debug2: dh genkey: priv key bits set: 121/256
debug2: bits set: 502/1024
debug1: SSH2 MSG_KEX_DH_GEXINIT sent
debug1: expecting SSH2 MSG_KEX_DH_GEXREPLY
debug3: check host_inhostfile: filename /home/xxxx/.ssh/known_hosts
debug3: check host_inhostfile: match line 1
debug3: check host_inhostfile: filename /home/xxxx/.ssh/known_hosts
debug3: check host_inhostfile: match line 1
debug1: Host 'hostname' is known and matches the RSA host key.
debug1: Found key in /home/xxxx/.ssh/known_hosts:1
debug2: bits set: 495/1024
hash mismatch
debug1: ssh rsaverify: signature incorrect
key_verify failed for server hostkey
[xxxx@localhost]$

For privacy reasons,
I have changed machine name to 'hostname' in the above log.
ip address to 'ip.ip.ip.ip'
username to xxxx

1) If I try connecting to ssh from the same machine on which the server is running. it works.
2) If I connect from a machine that has never connected to it before, it seemed to work.
2) I tried regenerating all the keys. But that didn't help either.

If anyone can point out how can I make this work. That would be of great help.

Thanks!

--
Regards,
Sai Kiran

iMac, Mac OS X (10.4.1), Intel based hardware

Posted on Sep 25, 2010 12:37 AM

Reply
5 replies

Sep 25, 2010 12:24 PM in response to saikiran

Hi Sai Kiran, and a warm welcome to the forums! 🙂

on my MacOS X 10.4.1 machine


10.4.1... or 10.4.11 ?

2) If I connect from a machine that has never connected to it before, it seemed to work.


Certainly no expert on this, but is it possible the IPs have changed on the ones that did connect & now can't?

Maybe the known_hosts file?

Sep 27, 2010 12:10 AM in response to BDAqua

Many thanks BDAqua!

I tried clearing the known_hosts file. But got the same error.

You're right the OS version is 10.4.11. Here are some more details about the OS -
Software:

System Software Overview:

System Version: Mac OS X Server 10.4.11 (8S2169)
Kernel Version: Darwin 8.11.1
Boot Volume: Server HD
Computer Name: [masked]
User Name: [masked]

Would you know which version of OpenSSL exists on this version of OS by default ? I would like to know the major and minor version information.

Also, if one recompiles OpenSSL libraries, should the keys be re-generated ?

Thanks !

--
Regards,
Sai Kiran

Sep 27, 2010 12:15 PM in response to BDAqua

BDAqua ! Many thanks for pointing out me to that link. This led me to the answer ! I found out the OpenSSH running on my MacOS machine. It was OpenSSH 5.1p. And then found out the corresponding OpenSSL version. The OpenSSL version is 0.9.7l (i.e. L). After recompiling OpenSSL 0.9.7l on my mac machine and restoring the libraries things are now working.

Thanks again for your help !

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

ssh not working

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.