[Klug-general] ssh connection woes

Athon Solo athon at athon.me.uk
Mon Jun 20 07:06:52 BST 2005


Hi Ritchie,

Have you reinstalled "laptop" recently, or changed its network setup?

It looks to me like it might be failing at the known_hosts check.

Basically ssh, by default, keeps a file ( ~/.ssh/known_hosts ) that
contains a unique identifier for each known host. If the setup of that
host changes, ssh will know and will disallow the connection. This is a
safety feature designed to stop one computer from pretending to be
another computer. You can simply delete the relevent line from
~/.ssh/known_hosts to clear SSH's memory.

Regards,

Allen Brooker


Ritchie Fraser wrote:
> All,
> 
> I am wondering if someone could shed some light onto what it is I'm doing
> wrong.
> 
> I have two machines on my home network:
> 	A P120,96Mb Ram and SuSE 7.3 (called desktop)
> 	An HP compaq nc6000 1.4GHz laptop (called laptop!)
> 
> My problem:
> 	I cant ssh into my laptop from my desktop but I can ssh into into my desktop
> from my laptop. "ssh -v ritchie at laptop" from the desktop gives the following
> output:
> 
> ritchie at desktop ritchie:> ssh -v ritchie at laptop
> OpenSSH_2.9p2, SSH protocols 1.5/2.0, OpenSSL 0x0090602f
> debug1: Reading configuration data /etc/ssh/ssh_config
> debug1: Applying options for *
> debug1: Seeding random number generator
> debug1: Rhosts Authentication disabled, originating port will not be trusted.
> debug1: restore_uid
> debug1: ssh_connect: getuid 500 geteuid 0 anon 1
> debug1: Connecting to laptop [192.168.1.2] port 22.
> debug1: temporarily_use_uid: 500/100 (e=0)
> debug1: restore_uid
> debug1: temporarily_use_uid: 500/100 (e=0)
> debug1: restore_uid
> debug1: Connection established.
> debug1: read PEM private key done: type DSA
> debug1: read PEM private key done: type RSA
> debug1: identity file /home/ritchie/.ssh/identity type 1
> debug1: identity file /home/ritchie/.ssh/id_rsa type -1
> debug1: identity file /home/ritchie/.ssh/id_dsa type -1
> debug1: Remote protocol version 1.99, remote software version OpenSSH_3.8p1
> debug1: match: OpenSSH_3.8p1 pat ^OpenSSH
> debug1: Local version string SSH-1.5-OpenSSH_2.9p2
> debug1: Waiting for server public key.
> debug1: Received server public key (768 bits) and host key (1024 bits).
> debug1: Host 'laptop' is known and matches the RSA1 host key.
> debug1: Found key in /home/ritchie/.ssh/known_hosts:3
> debug1: Encryption type: 3des
> debug1: Sent encrypted session key.
> debug1: Installing crc compensation attack detector.
> debug1: Received encrypted confirmation.
> Permission denied.
> debug1: Calling cleanup 0x80651a0(0x0)
> ritchie at desktop ritchie:>
> 
> 
> The ssh into desktop from laptop gives...
> 
> ritchie at laptop:~> ssh -v ritchie at desktop
> OpenSSH_3.8p1, SSH protocols 1.5/2.0, OpenSSL 0.9.7d 17 Mar 2004
> debug1: Reading configuration data /etc/ssh/ssh_config
> debug1: Applying options for *
> debug1: Connecting to desktop [192.168.1.3] port 22.
> debug1: Connection established.
> debug1: identity file /home/ritchie/.ssh/identity type -1
> debug1: identity file /home/ritchie/.ssh/id_rsa type -1
> debug1: identity file /home/ritchie/.ssh/id_dsa type -1
> debug1: Remote protocol version 1.99, remote software version OpenSSH_2.9p2
> debug1: match: OpenSSH_2.9p2 pat OpenSSH_2.*,OpenSSH_3.0*,OpenSSH_3.1*
> debug1: Enabling compatibility mode for protocol 2.0
> debug1: Local version string SSH-2.0-OpenSSH_3.8p1
> debug1: SSH2_MSG_KEXINIT sent
> debug1: SSH2_MSG_KEXINIT received
> debug1: kex: server->client aes128-cbc hmac-md5 none
> debug1: kex: client->server aes128-cbc 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: Host 'desktop' is known and matches the DSA host key.
> debug1: Found key in /home/ritchie/.ssh/known_hosts:1
> debug1: ssh_dss_verify: signature correct
> debug1: SSH2_MSG_NEWKEYS sent
> debug1: expecting SSH2_MSG_NEWKEYS
> debug1: SSH2_MSG_NEWKEYS received
> 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: /home/ritchie/.ssh/identity
> debug1: Trying private key: /home/ritchie/.ssh/id_rsa
> debug1: read PEM private key done: type RSA
> debug1: Authentications that can continue: publickey,password
> debug1: Trying private key: /home/ritchie/.ssh/id_dsa
> debug1: Next authentication method: password
> ritchie at desktop's password:
> debug1: Authentication succeeded (password).
> debug1: channel 0: new [client-session]
> debug1: Entering interactive session.
> Last login: Sun Jun 19 15:59:16 2005 from laptop.fraser
> Have a lot of fun...
> ritchie at desktop ritchie:>
> 
> Any / all help much appreciated.
> 
> 
> Ritchie
> 
> --
> Old age is the most unexpected of things that can happen to a man.
> 		-- Trotsky
> 
> -------------------------------------------------------
> 



More information about the Kent mailing list