Subject: | Bug in Net::SSH::Perl |
Date: | Thu, 23 Oct 2008 20:43:11 +0200 |
To: | <bug-Net-SSH-Perl [...] rt.cpan.org> |
From: | "Vicky Ronnen" <Vicky.Ronnen [...] nccw.nl> |
xx.pl:
#!/usr/bin/perl
use strict;
use warnings;
use Net::SSH::Perl;
my $ssh=Net::SSH::Perl->new("localhost", (protocol => 2, debug => 1));
$ssh->login("root");
my ($stdout,$stderr,$exit)=$ssh->cmd("date");
print "@data","\n";
Debug:
perl -d xx.pl
Loading DB routines from perl5db.pl version 1.28
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(xx.pl:6): my $ssh=Net::SSH::Perl->new("localhost",
(protocol => 2, debug => 1));
DB<1> c
nbmaster1: Reading configuration data /root/.ssh/config
nbmaster1: Reading configuration data /etc/ssh_config
nbmaster1: Allocated local port 1022.
nbmaster1: Connecting to localhost, port 22.
nbmaster1: Remote protocol version 2.0, remote software version
OpenSSH_4.3
nbmaster1: Net::SSH::Perl Version 1.32, protocol version 2.0.
nbmaster1: No compat match: OpenSSH_4.3.
nbmaster1: Connection established.
nbmaster1: Sent key-exchange init (KEXINIT), wait response.
nbmaster1: Algorithms, c->s: 3des-cbc hmac-sha1 none
nbmaster1: Algorithms, s->c: 3des-cbc hmac-sha1 none
nbmaster1: Entering Diffie-Hellman Group 1 key exchange.
nbmaster1: Sent DH public key, waiting for reply.
nbmaster1: Received host key, type 'ssh-dss'.
nbmaster1: Host 'localhost' is known and matches the host key.
nbmaster1: Computing shared secret key.
nbmaster1: Verifying server signature.
nbmaster1: Waiting for NEWKEYS message.
nbmaster1: Enabling incoming encryption/MAC/compression.
nbmaster1: Send NEWKEYS, enable outgoing encryption/MAC/compression.
nbmaster1: Sending request for user-authentication service.
nbmaster1: Service accepted: ssh-userauth.
nbmaster1: Trying empty user-authentication request.
nbmaster1: Authentication methods that can continue:
publickey,gssapi-with-mic,password.
nbmaster1: Next method to try is publickey.
nbmaster1: Trying pubkey authentication with key file
'/root/.ssh/id_dsa'
nbmaster1: Login completed, opening dummy shell channel.
nbmaster1: channel 0: new [client-session]
nbmaster1: Requesting channel_open for channel 0.
nbmaster1: channel 0: open confirm rwindow 0 rmax 32768
nbmaster1: Got channel open confirmation, requesting shell.
nbmaster1: Requesting service shell on channel 0.
Could not dupe: No such file or directory
at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/SSH2.pm line 27
Net::SSH::Perl::SSH2::_dup('STDIN', '<') called at
/usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/SSH2.pm line 102
Net::SSH::Perl::SSH2::_session_channel('Net::SSH::Perl::SSH2=HASH(0xa317
c20)') called at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/SSH2.pm
line 133
Net::SSH::Perl::SSH2::cmd('Net::SSH::Perl::SSH2=HASH(0xa317c20)',
'date', 'undef') called at xx.pl line 9
Debugged program terminated. Use q to quit or R to restart,
use o inhibit_exit to avoid stopping after program termination,
h q, h R or h o to get additional info.
DB<1>
I'm doing something wrong or did I discover a bug?
Vicky