ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
3593
3593
EMPFEHLEN
-
25.11.04 22:48 #1
- Registriert seit
- Apr 2004
- Beiträge
- 80
Hallo zusammen.
Seid einiger Zeit versuche ich nun eine SSH Verbindung mit Net::SSH::Perl
aufzubauen und so langsam verzweifele ich!
Das Problem besteht darin das ich zwar eine SSH Verbindung aufbauen kann, allerdings nur wenn ich das Password interactive über die Tastaur eingeben.
#!/usr/bin/perl
use Net::SSH::Perl;
$user = "foo";
$pass = "xxx";
$ssh = Net::SSH::Perl->new('172.16.1.85',debug => 1,options=>[ "BatchMode yes"], protocol=>'2,1' );
$ssh->login($user,$pass);
($stdout, $stderr, $exit) = $ssh->cmd("ls");
print $stdout;
print $stderr;
print $exit;
exit;
Gibt folgendes aus:
linux: Reading configuration data /home/foo/.ssh/config
linux: Reading configuration data /etc/ssh_config
linux: Connecting to 172.16.1.85, port 22.
linux: Remote protocol version 1.99, remote software version OpenSSH_3.8p1
linux: Net::SSH::Perl Version 1.25, protocol version 2.0.
linux: No compat match: OpenSSH_3.8p1.
linux: Connection established.
linux: Sent key-exchange init (KEXINIT), wait response.
linux: Algorithms, c->s: 3des-cbc hmac-sha1 none
linux: Algorithms, s->c: 3des-cbc hmac-sha1 none
linux: Entering Diffie-Hellman Group 1 key exchange.
linux: Sent DH public key, waiting for reply.
linux: Received host key, type 'ssh-dss'.
linux: Host '172.16.1.85' is known and matches the host key.
linux: Computing shared secret key.
linux: Verifying server signature.
linux: Waiting for NEWKEYS message.
linux: Enabling incoming encryption/MAC/compression.
linux: Send NEWKEYS, enable outgoing encryption/MAC/compression.
linux: Sending request for user-authentication service.
linux: Service accepted: ssh-userauth.
linux: Trying empty user-authentication request.
linux: Authentication methods that can continue: publickey,keyboard-interactive.
linux: Next method to try is publickey.
Permission denied at ./perl-ssh line 10
Wenn ich allerdings im Script den Wert "BatchMode no" setze und das Passwort interactive eingeben funktioniert es.
Ich hoffe es gibt hier jemanden der weiß woran es liegen könnte.
Ähnliche Themen
-
Probleme mit RGB
Von julzzzzz im Forum PhotoshopAntworten: 2Letzter Beitrag: 03.04.07, 16:44 -
Probleme mit IE 5.5
Von geos im Forum CSSAntworten: 4Letzter Beitrag: 30.04.06, 07:15 -
Premiere Pro Export probleme / Projekt Probleme
Von DanielT im Forum Videoschnitt, Videotechnik & -produktionAntworten: 5Letzter Beitrag: 31.10.03, 17:48 -
Probleme mit cout (War: Probleme bei meinem Programm)
Von DöDö im Forum C/C++Antworten: 6Letzter Beitrag: 21.05.03, 12:49 -
css probleme
Von untread im Forum CSSAntworten: 3Letzter Beitrag: 27.03.02, 11:57





Zitieren
Login





