Net::SSH::Perl problème d'authentification

Net::SSH::Perl problème d'authentification - Perl - Programmation

Marsh Posté le 19-09-2006 à 11:46:38    

Bonjour à tous.
 
Je suis en train d'écrire un petit script utilisant le module perl Net::SSH. Malheureusement,  je ne dépasse pas l'étape de l'authentification. Quelqu'un pourrait m'aider siou'plait ??
 

Code :
  1. use Net::SSH::Perl;
  2. my $ssh = Net::SSH::Perl->new("XXXXXXX",debug => 1);
  3. $ssh->login("XXXXX", "XXXXXX" );
  4. my($out, $err, $exit) = $ssh->cmd("ls" );
  5. print "$out\n$err\n$exit";


 
Et voila ce que ça donne...

Citation :


SLTSSI01: Remote protocol version 2.0, remote software version OpenSSH_3.9p1 Debian-1ubuntu2.2
SLTSSI01: Net::SSH::Perl Version 1.30, protocol version 2.0.
SLTSSI01: No compat match: OpenSSH_3.9p1 Debian-1ubuntu2.2.
SLTSSI01: Connection established.
SLTSSI01: Sent key-exchange init (KEXINIT), wait response.
SLTSSI01: Algorithms, c->s: 3des-cbc hmac-sha1 none
SLTSSI01: Algorithms, s->c: 3des-cbc hmac-sha1 none
SLTSSI01: Entering Diffie-Hellman Group 1 key exchange.
SLTSSI01: Sent DH public key, waiting for reply.
SLTSSI01: Received host key, type 'ssh-dss'.
SLTSSI01: Host 'localhost' is known and matches the host key.
SLTSSI01: Computing shared secret key.
SLTSSI01: Verifying server signature.
SLTSSI01: Waiting for NEWKEYS message.
SLTSSI01: Enabling incoming encryption/MAC/compression.
SLTSSI01: Send NEWKEYS, enable outgoing encryption/MAC/compression.
SLTSSI01: Sending request for user-authentication service.
SLTSSI01: Service accepted: ssh-userauth.
SLTSSI01: Trying empty user-authentication request.
SLTSSI01: Authentication methods that can continue: publickey,keyboard-interactive.
SLTSSI01: Next method to try is publickey.
Permission denied at testSSH.pl line 12


 
Je ne comprends pas trop le "Trying empty user-authentication request.", j'ai pourtant mis un login et un pass (qui dont bon).


---------------
"Si ça peut déconner, ça va déconner..."
Reply

Marsh Posté le 19-09-2006 à 11:46:38   

Reply

Marsh Posté le 19-09-2006 à 13:53:35    

J'ai fait de nouveaux tests. En mettant la methode à "Interactive", le script me demande mon mot de passe (normal après tout) et là, ça marche... :??:


---------------
"Si ça peut déconner, ça va déconner..."
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed