Thread Net::SSH2 Skript
(9 answers)
Opened by cohama at 2011-10-20 11:12
2011-10-20T09:12:08 cohama Du kannst keinen channel anfordern bevor du die Verbindung aufgebaut und dich eingeloggt hast. Tust du das, kommt es zum obigen Fehler. Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 $ssh->auth_password($ssh_user,$ssh_pass); if ($ssh->auth_ok()) { my $session = $ssh->channel(); $session->exec('uname -a'); while ($session->read(my $answer,1024)) { print $answer; } $session->close(); $ssh->disconnect(); } else { print STDERR "authentication failed\n"; } View full thread Net::SSH2 Skript |