[Ssh-sftp-perl-users] Net::SSH::Perl does not work properly
Brought to you by:
dbrobins
From: Luís C. V. <lui...@gm...> - 2012-01-03 19:49:42
|
Hello everybody! well, i'm facing a weird problem and have no idea how to solve it. i'm running a perl script to ssh a special device and the following lines shows: Reading configuration data /root/.ssh/config Reading configuration data /etc/ssh_config Allocated local port 1023. Connecting to xxx.com, port 22. Remote protocol version 2.0, remote software version Mocana SSH Net::SSH::Perl Version 1.34, protocol version 2.0. No compat match: Mocana SSH <- What does mean? Connection established. Sent key-exchange init (KEXINIT), wait response. Algorithms, c->s: 3des-cbc hmac-sha1 none Algorithms, s->c: 3des-cbc hmac-sha1 none Entering Diffie-Hellman Group 1 key exchange. Sent DH public key, waiting for reply. Connection closed by remote host. at /usr/lib/perl5/vendor_perl/5.8.8/Net/SSH/Perl/Kex/DH1.pm line 41 <- What does mean? What mistake did I ? Does anybody know what is happening? Thanks in advanced. # # The Script to SSH # ! ! #!/usr/bin/perl -w use strict; use Net::SSH::Perl; use Data::Dumper; my $host = shift; my $user = "user"; my $password = "********"; my $cmd = 'show clock'; my $ssh = Net::SSH::Perl->new( $host, debug => 3, protocol => + 2, use_pty => 1 ); $ssh->login(); my ($out, $err, $exit ) = $ssh->cmd($cmd); print "out = $out\nerr = $err\nexit = $exit\n"; ! ! |