Salut,
Je tourne en rond avec un petit soucis depuis hier…
Je n’arrive plus à me connecter à un serveur ssh en utilisant une clef pourtant sans “passphrase”…
[quote]rm .ssh/nas
rm .ssh/nas.pub
ssh-keygen -t dsa -f ~/.ssh/nas
Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase): (J’appuie sur entrée)
Enter same passphrase again: (encore entrée)
…
chmod 600 /home/laurent/.ssh/nas
chmod 600 /home/laurent/.ssh/nas.pub
ssh-copy-id -i ~/.ssh/nas.pub "root@nas.zehome.org -p xxx22"
root@nas.zehome.org’s password:
Now try logging into the machine, with “ssh 'root@nas.zehome.org -p xxx22’”, and check in:
~/.ssh/authorized_keys
to make sure we haven’t added extra keys that you weren’t expecting.
ssh nas
Enter passphrase for key ‘/home/laurent/.ssh/nas.pub’:
Permission denied (publickey,password).[/quote]
La sortie "bavarde:
ssh -v nas
OpenSSH_5.9p1 Debian-5, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /home/laurent/.ssh/config
debug1: /home/laurent/.ssh/config line 33: Applying options for nas
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to nas.zehome.org [10.9.8.6] port xxx22.
debug1: Connection established.
debug1: identity file /home/laurent/.ssh/nas.pub type 2
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: identity file /home/laurent/.ssh/nas.pub-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-2
debug1: match: OpenSSH_5.9p1 Debian-2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: RSA 19:21:ab:ed:7a:b3:87:e9:dc:13:fb:c0:a9:72:eb:31
debug1: Host '[nas.zehome.org]:xxx22' is known and matches the RSA host key.
debug1: Found key in /home/laurent/.ssh/known_hosts:4
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
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: Offering DSA public key: /home/laurent/.ssh/nas.pub
debug1: Server accepts key: pkalg ssh-dss blen 433
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
Enter passphrase for key '/home/laurent/.ssh/nas.pub':
debug1: No more authentication methods to try.
Permission denied (publickey,password).
Le sshd_config côté serveur est correct: connexion par clef autorisée, connexion de root autorisée, le chemin vers authorized_keys est bon…
J’ai tenté de mettre sur “no” le “StrictModes” de ssh-serveur, sans succès.
J’ai complètement effacé côté client le dossier .ssh pour le recréer.
J’ai vidé le fichier authorized_keys côté serveur.
Pensant que ça pouvait peut-être venir d’un problème avec zsh, j’ai tout recommencé dans /bin/bash…
Je crois me souvenir qu’il existe une commande pour ré-initialiser tout ça (je ne parle pas de remove --purge), j’ai oublié, je ne suis même pas sur qu’elle existe…
Bref, je ne sais plus quoi faire…