Scp sans password

Résolu/Fermé
david79 - 5 mars 2008 à 08:55
bob031 Messages postés 8158 Date d'inscription samedi 7 août 2004 Statut Membre Dernière intervention 1 septembre 2014 - 5 mars 2008 à 11:16
Bonjour,

J'ai un serveur qui effectue différentes opérations, et notamment la récupération de conf en scp sur des biotiers.*

Pour ce faire, sur mon serveur, j'ai effectué un

ssh-keygen -t rsa(sans passphrase)

j'ai ensuite copié le fichier id_pub.rsa sur mon boitier dans le rep /user/.ssh/. Puis j'ai fait un

cat id_pub.rsa >> authoriezd_keys (clé bien rajoutée...nickel)

sur mon serveur, quand je fait un scp -B user@IP:/chemin/fichier . => il le recupere nickel

J'ai fait la meme manip sur un deuxieme boitier avec la meme clé
copie du fichier id_pub.rsa déja créé
ajouté a la suite du authorized_keys

j'ai voulu tester un scp => il me sort un host key verification failed alors que ca marche sur le premier boitier avec cette clé et les mmes manips effectuées.

Avez-vous une petite idee du pourquoi cette erreur ??

mercid'avance a tous
A voir également:

5 réponses

bob031 Messages postés 8158 Date d'inscription samedi 7 août 2004 Statut Membre Dernière intervention 1 septembre 2014 472
5 mars 2008 à 09:35
bonjour,

et en mode verbeux, ça raconte quoi ???

:-))
0
boitier qui marche pas :

[root@redhat4 .ssh]# scp -B -v root@@IP1:/test.conf .
Executing: program /usr/bin/ssh host @IP1, user root, command scp -v -f /test.conf
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to @IP1 [@IP1] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type 1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.5
debug1: match: OpenSSH_4.5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9p1
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
Host key verification failed.


boitier qui marche :


[root@redhat4 .ssh]# scp -B -v root@IP2:/test.conf .
Executing: program /usr/bin/ssh host @IP2, user root, command scp -v -f /test.conf
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to @IP2 [@IP2] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type 1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.5
debug1: match: OpenSSH_4.5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9p1
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 '@IP2 known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:3
debug1: ssh_rsa_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,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Offering public key: /root/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 149
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: scp -v -f /test.conf
Sink: C0600 1701 test.conf
test.conf 0% 0 0.0KB/s --:-- ETASending file modes: C0600 1701 test.conf
test.conf 100% 1701 1.7KB/s 00:00
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.1 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0
[root@redhat4 .ssh]#




config du sshd_config identique sur les deux boitiers
même clé rsa sur les deux boitiers
0
bob031 Messages postés 8158 Date d'inscription samedi 7 août 2004 Statut Membre Dernière intervention 1 septembre 2014 472
5 mars 2008 à 10:21
à tout hasard en virant le fichier ~/.ssh/known_hosts du boîtier qui pose problème !
0
Pas mieux :((
0
bob031 Messages postés 8158 Date d'inscription samedi 7 août 2004 Statut Membre Dernière intervention 1 septembre 2014 472
5 mars 2008 à 10:47
y'a pas plus verbeux que ça (je parle surtout pour le boîtier qui pose problème) ?

et un simple ssh sur le boîtier qui pose problème : ça dit quoi ?
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
C'est good..........pkoi ??? parce qu'il a été rajouté dans les known_hosts... :

a partir de mon serveur, j'ai fait un

ssh @IP bopitier2 boitier qui posait probleme

j'ai eu les messages suivants :

authenticity of host '@IP2 (@IP2)' can't be established.
RSA key fingerprint is fd:54:68:e5:b7:d2:60:27:b6:e3:79:c4:ca:0a:72:ef.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.200.175.6' (RSA) to the list of known hosts.

et la mon scp fonctioonne maintenant !!!!

de la boule

merci bob !!!
tchuss et bonne journée
0
bob031 Messages postés 8158 Date d'inscription samedi 7 août 2004 Statut Membre Dernière intervention 1 septembre 2014 472
5 mars 2008 à 11:16
no problémo !

en parcourant les forums sur ton problème, j'ai lu à un moment donné l'éventualité que le boîtier qui pose problème n'ait jamais été connecté avec le serveur ! et ça disait qu'alors....et ben ça le fait pô !

et voilà !

tchôôô !

:-))
0