PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.security.ssh > Public key authentication doesn't work
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.security.ssh SSH secure remote login and tunneling tools.

Public key authentication doesn't work

Réponse
 
LinkBack Outils de la discussion
Vieux 02/11/2006, 21h41   #1
Guillaume Dargaud
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Public key authentication doesn't work

Hello all, long time no see...
I've been using ssh for quite a while to connect to a specific machine using
public key authentication. Now I want to connect to the same machine but a
different username. I did the usual copy of the local .ssh/id_dsa.pub into
the remote .ssh/authorized_keys but still the public key authentication
doesn't work. It reverts to password login which works fine.

Any idea what may be wrong but the public key authentication ?

Here's a login debug:
dargaud@penguin ~/home 0 $ ssh -vv otheruser@somewhere.remote.com
OpenSSH_4.4p1, OpenSSL 0.9.8d 28 Sep 2006
debug2: ssh_connect: needpriv 0
debug1: Connecting to somewhere.remote.com [IP.IP.IP.IP] port 22.
debug1: Connection established.
debug1: identity file /home/dargaud/.ssh/identity type -1
debug1: identity file /home/dargaud/.ssh/id_rsa type -1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/dargaud/.ssh/id_dsa type 2
debug1: Remote protocol version 1.99, remote software version
OpenSSH_3.6.1p2
debug1: match: OpenSSH_3.6.1p2 pat OpenSSH_3.*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.4
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit:
diffie-hellman-group-exchange-sha256,diffie-hellman-g
roup-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,arcfour1
28,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-c
tr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit:
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour1
28,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-c
tr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@open
ssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@open
ssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,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-gro
up1-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
debug2: kex_parse_kexinit:
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@open
ssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@open
ssh.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: 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: 124/256
debug2: bits set: 494/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'somewhere.remote.com' is known and matches the RSA host key.
debug1: Found key in /home/dargaud/.ssh/known_hosts:10
debug2: bits set: 507/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: /home/dargaud/.ssh/identity (0x0)
debug2: key: /home/dargaud/.ssh/id_rsa (0x0)
debug2: key: /home/dargaud/.ssh/id_dsa (0x6aa7a8)
debug1: Authentications that can continue:
publickey,password,keyboard-interacti
ve
debug1: Next authentication method: publickey
debug1: Trying private key: /home/dargaud/.ssh/identity
debug1: Trying private key: /home/dargaud/.ssh/id_rsa
debug1: Offering public key: /home/dargaud/.ssh/id_dsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue:
publickey,password,keyboard-interacti
ve
debug2: we did not send a packet, disable method
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-interacti
ve
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
otheruser@somewhere.remote.com's password:
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 0
debug2: channel 0: request shell confirm 0
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
Last login: Thu Nov 2 13:47:51 2006 from IP.IP.IP.IP
[otheruser@somewhere otheruser]$


--
Guillaume Dargaud
http://www.gdargaud.net/Antarctica/


  Réponse avec citation
Vieux 02/11/2006, 22h18   #2
Guillaume Dargaud
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Public key authentication doesn't work

A few more precisions:

Origin system: WinXP with cygwin
$ uname -a
CYGWIN_NT-5.1 penguin 1.5.21(0.156/4/2) 2006-07-30 14:21 i686 Cygwin
$ ssh -V
OpenSSH_4.4p1, OpenSSL 0.9.8d 28 Sep 2006

Remote system with working public key (same username as above):
$ uname -a
Linux somewhere1.remote.com 2.4.20-29.7.progeny.9 #1 Fri Jan 7 17:11:38 EST
2005 i686 unknown
$ ssh -V
OpenSSH_3.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f


Remote system with failing public key (different username):
$ uname -a
Linux somewhere2.remote.com 2.4.21-47.ELsmp #1 SMP Wed Jul 5 20:38:41 EDT
2006 i686 i686 i386 GNU/Linux
$ ssh -V
OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f

I though the target systems where clones of each other, but it's not the
case.
I've checked the chmod of .ssh/* for all 3 machines.
--
Guillaume Dargaud
http://www.gdargaud.net/
"Even if you can hit a glass on the table four out of five times when
you're clipping your toenails, women will never truly appreciate your
skill." — Clynch Varnadore.


  Réponse avec citation
Vieux 02/11/2006, 22h55   #3
Guillaume Dargaud
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Public key authentication doesn't work (solved)

Sorry, solved it after much googling.
..ssh was chmod 700 instead of 755 on remote machine.
--
Guillaume Dargaud
http://www.gdargaud.net/
"They say that 50% of all marriages end in divorce. That's not as bad as
it sounds, considering that the other 50% end in death."


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h47.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11262 seconds with 11 queries