Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

SSH won't do publickey authentication

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Tools Discussion Forum >> SSH won't do publickey authentication Page: [1]
Login
Message << Older Topic   Newer Topic >>
SSH won't do publickey authentication - Dec. 16, '05, 1:06:05 PM   
vlack

 

Posts: 3
Joined: Nov. 9, '05,
Status: offline
I'm trying to ssh from Mac OS X to Interix, and seeing errors that I can't make heads or tails of. (I'm also having trouble with my Interix-to-localhost ssh attempts, but that problem seems to be unrelated - at least, the error message is different. I still think that I may be able to work those out.)

The error message seems to indicate that something is wrong with my keyfile? However, I have used that key file for months without problems on other hosts.

Following are dumps of "ls -alF ~/.ssh" and "ssh -vvv Micah@192.168.0.60".
reflective == 192.168.0.60 == the Interix host
AndrAIa == 192.168.0.61 == the Mac OS X box

11:55:16 Micah@reflective .ssh> ls -alF
total 4.0K
drwxr-xr-x  1 Micah           +SYSTEM           0 Dec 16 11:55 ./
drwxrwxrwx  1 +Administrators +SYSTEM           0 Dec 16 10:45 ../
-rw-rw----  1 Micah           +Administrators 681 Dec 16 11:17 authorized_keys
-rw-rw----  1 Micah           +Administrators 226 Dec 16 10:58 authorized_keys2
-rwxrwx---  1 Micah           +Administrators 843 Dec 16 10:45 id_rsa*
lr--r--r--  1 Micah           +SYSTEM           6 Dec 16 11:55 id_rsa.ppk -> id_rsa*
-rwxrwx---  1 Micah           +Administrators 294 Dec 16 10:45 id_rsa.pub*
-rw-r--r--  1 Micah           +Administrators 391 Dec 16 11:52 known_hosts


11:58:21 micah@AndrAIa micah% ssh -vvv Micah@192.168.0.60
OpenSSH_3.8.1p1, OpenSSL 0.9.7g 11 Apr 2005
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.0.60 [192.168.0.60] port 22.
debug1: Connection established.
debug1: identity file /Users/micah/.ssh/identity type -1
debug3: Not a RSA1 key file /Users/micah/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /Users/micah/.ssh/id_rsa type 1
debug1: identity file /Users/micah/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version InteropSecShell_4.2
debug1: no match: InteropSecShell_4.2
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1
debug3: Trying to reverse map address 192.168.0.60.
debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
A parameter was malformed
Validation error

debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
A parameter was malformed
Validation error

debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: 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_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 139/256
debug2: bits set: 523/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: check_host_in_hostfile: filename /Users/micah/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 22
debug1: Host '192.168.0.60' is known and matches the RSA host key.
debug1: Found key in /Users/micah/.ssh/known_hosts:22
debug2: bits set: 520/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /Users/micah/.ssh/identity (0x0)
debug2: key: /Users/micah/.ssh/id_rsa (0x307560)
debug2: key: /Users/micah/.ssh/id_dsa (0x0)
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred gssapi-with-mic,gssapi,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/micah/.ssh/identity
debug3: no such identity: /Users/micah/.ssh/identity
debug1: Offering public key: /Users/micah/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /Users/micah/.ssh/id_dsa
debug3: no such identity: /Users/micah/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: userauth_kbdint: disable: no info_req_seen
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: 
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
Micah@192.168.0.60's password:
Post #: 1
RE: SSH won't do publickey authentication - Dec. 16, '05, 2:28:03 PM   
Rodney

 

Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
Did you transfer the file over using a Win32 program?
If so you may have Win32 line endings. Run the "flip -u command on the file to make it have
unix line endings.

(in reply to vlack)
Post #: 2
RE: SSH won't do publickey authentication - Dec. 16, '05, 3:19:21 PM   
vlack

 

Posts: 3
Joined: Nov. 9, '05,
Status: offline
Wait, which file?
Under Mac OS X, I created the .ssh/id_rsa and .ssh/id_rsa.pub file with ssh from the command line. I don't think this could be a problem there.
On the Interix SSH host, I created the .ssh/authorized_keys file with the emacs that ships with Interix.

Which file did you want me to flip?

(in reply to Rodney)
Post #: 3
RE: SSH won't do publickey authentication - Dec. 16, '05, 4:03:56 PM   
Rodney

 

Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
People usually copy the files around. If you've generated them with Interix tools then that's fine. Likely doesn't need a flip.

Check the permissions and ownership on the file. Also check that you home directory as
listed in the user database is set. "$HOME" doesn't do it since this is an easy spoof.
Refer to the FAQ about setting the home directory.

(in reply to vlack)
Post #: 4
RE: SSH won't do publickey authentication - Dec. 16, '05, 4:11:55 PM   
vlack

 

Posts: 3
Joined: Nov. 9, '05,
Status: offline
Permissions look ok to me:
-rw-rw----  1 Micah           +Administrators 681 Dec 16 11:17 authorized_keys
-rw-rw----  1 Micah           +Administrators 226 Dec 16 10:58 authorized_keys2


Also, 'finger Micah' gives my homedir as "/dev/fs/L/Users/Micah". Incidentally, L:\Users is linked (using Junction Points) to L:\Documents and Settings - this way, I kept my homedir in the same place, and avoided a space in its name. Anyway, that wouldn't cause the problem, would it?

(in reply to Rodney)
Post #: 5
RE: SSH won't do publickey authentication - Dec. 16, '05, 6:02:06 PM   
Rodney

 

Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
No, the permissions are wrong. Mode 644 (rw-r--r--) is acceptable.
The group and/or world should never be allowed write access.
Try changing this first before delving off into looking at the Junction point.

(in reply to vlack)
Post #: 6
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Tools Discussion Forum >> SSH won't do publickey authentication Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.047