Leser: 3
8 Einträge, 1 Seite |
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/usr/bin/perl use Net::SSH::Perl; my $host = "hostname"; my $pass = "passwort"; my $user = "benutzername"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $pass); # test-command ($out, $err, $exit) = $ssh->cmd("ls -l"); print ("$out"); print ("$err"); print ("$exit");
QuoteTk::Error: Permission denied at script_v_0-3.pl line 330
Math::BigInt::BEGIN at (eval 15) line 1
Math::BigInt::BEGIN at (eval 16) line 1
Math::BigInt::BEGIN at (eval 17) line 1
Math::BigInt::BEGIN at (eval 34) line 1
Math::BigInt::BEGIN at (eval 35) line 1
Math::BigInt::BEGIN at (eval 37) line 1
Math::BigInt::BEGIN at (eval 38) line 1
Math::BigInt::BEGIN at (eval 40) line 1
Math::BigInt::BEGIN at (eval 41) line 1
Carp::croak at /usr/lib/perl5/5.8.8/Carp.pm line 269
Net::SSH::Perl::fatal_disconnect at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl.pm line 258
Net::SSH::Perl::SSH2::login at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/SSH2.pm line 66
main::test at script_v_0-3.pl line 330
Tk callback for .frame.button4
Tk::__ANON__ at /usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/Tk.pm line 247
Tk::Button::butUp at /usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/Tk/Button.pm line 111
<ButtonRelease-1>
(command bound to event)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/usr/bin/perl use Net::SSH::Perl; use strict; use warnings; my $host = "hostname"; my $pass = "passwort"; my $user = "benutzername"; my $ssh = Net::SSH::Perl->new($host, protocol => "1"); $ssh->login($user, $pass); # test-command (my $out, my $err, my $exit) = $ssh->cmd("ls -l"); print ("$out"); print ("$err"); print ("$exit");
Quoteuse Net::SSH::Perl;
my $ssh = Net::SSH::Perl->new($host);
$ssh->login($user, $pass);
my($stdout, $stderr, $exit) = $ssh->cmd($cmd);
my $ssh = Net::SSH::Perl->new($host);
my $ssh = Net::SSH::Perl->new($host, debug => 1);
Quotezielhost: Connecting to zielhost, port 22.
zielhost: Remote version string: SSH-1.99-OpenSSH_4.4
zielhost: Remote protocol version 1.99, remote software version OpenSSH_4.4
zielhost: Net::SSH::Perl Version 1.30, protocol version 1.5.
zielhost: No compat match: OpenSSH_4.4.
zielhost: Connection established.
zielhost: Waiting for server public key.
zielhost: Received server public key (768 bits) and host key (1024 bits).
zielhost: Host 'zielhost' is known and matches the host key.
zielhost: Encryption type: DES3
zielhost: Sent encrypted session key.
zielhost: Received encryption confirmation.
zielhost: RSA authentication using agent refused.
zielhost: RSA authentication failed: Can't load public key.
zielhost: Doing challenge response authentication.
1 2 3 4 5
my $host = "hostname"; my $pass = "passwort"; my $user = "benutzername"; my $ssh = Net::SSH::Perl->new($host, protocol => "1"); $ssh->login($user, $pass);
Quotezielhost: Connecting to zielhost, port 22.
zielhost: Remote version string: SSH-1.99-OpenSSH_4.4
zielhost: Remote protocol version 1.99, remote software version OpenSSH_4.4
zielhost: Net::SSH::Perl Version 1.30, protocol version 1.5.
zielhost: No compat match: OpenSSH_4.4.
zielhost: Connection established.
1 2 3 4
(my $out, my $err, my $exit) = $ssh->cmd("ls -l"); print ("$out"); print ("$err"); print ("$exit");
Quoteiai-jakob2: Waiting for server public key.
iai-jakob2: Received server public key (768 bits) and host key (1024 bits).
iai-jakob2: Host 'iai-jakob2' is known and matches the host key.
iai-jakob2: Encryption type: DES3
iai-jakob2: Sent encrypted session key.
iai-jakob2: Received encryption confirmation.
iai-jakob2: RSA authentication using agent refused.
iai-jakob2: RSA authentication failed: Can't load public key.
iai-jakob2: Doing challenge response authentication.
8 Einträge, 1 Seite |