Skip Menu |

This queue is for tickets about the Net-SSH-Expect CPAN distribution.

Report information
The Basics
Id: 56360
Status: new
Priority: 0/
Queue: Net-SSH-Expect

People
Owner: Nobody in particular
Requestors: l_epa_m_inonda [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: SSHAuthenticationError is a false positive error!
Date: Wed, 7 Apr 2010 20:47:59 +0200
To: <bug-net-ssh-expect [...] rt.cpan.org>
From: Tebano epaminonda <l_epa_m_inonda [...] hotmail.com>
Hi, I'm trying to use the perl module Net::SSH::Expect. I've tryed on many platforms; result is always the same: SSHAuthenticationError Error: Bad password [@esx1:~[root@esx1 ~]# ] at /usr/perl5/site_perl/5.8.4/Expect.pm line 760 But how You can see from report of failed login, [@esx1:~[root@esx1 ~]# ] it wasn't failed!!! Here the code I'm using: --------------------------------------------------------------------------------------------------------------------------- #!/usr/bin/perl -w # Esegui script distribuito use Net::SSH::Expect; # SOME VARIABLES $linea = 0; $miofile = "/tmp/listanodi"; $tuofile = "/tmp/script"; $user = "root"; $password = "password"; # open(MYFILE, "$miofile") || die("cannot open user file /tmp/listanodi"); # foreach $linea (<MYFILE>) { print $linea; chomp($linea); # -- set up a new ssh connection my $ssh = Net::SSH::Expect->new( host => "$linea", password => "$password", user => "$user", raw_pty => 1, timeout => 10 ); # -- authenticate my $login_output = $ssh->login("$linea", "$user", "$password"); if ($login_output !~ /Last login/) { die "Login has failed. Login output was $login_output"; }; $ssh->exec("stty raw -echo"); # -- execute the command my($stdout, $stderr, $exit) = $ssh->exec("ls -l $tuofile"); }; close(MYFILE); # exit; --------------------------------------------------------------------------------------------------------------------------- Into the block: # -- authenticate is the problem; Expect.pm line 760 report a failed login instead of a correct one, also if I try to bypass the problem saying "it's all right!"... Distribution: CPAN.pm: Going to build B/BN/BNEGRAO/Net-SSH-Expect-1.09.tar.gz Perl v5.8.4 SunOS SunOS 5.11 snv_98 i86pc i386 i86pc -------------------------------------------------------------------------------------------------------------------------- But I've tryed also on many Linux flavour, before try it on Solaris, without success (same problem!): Ubuntu 9.10; OpenSuse 11.2; Slackware 12.1 I say You that, because in these Linux ones, there are perl 5.10 and a release of Cpan higher than that one... Can You help me? Thanks. cheers, Tebano. Show quoted text
_________________________________________________________________ Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. https://signup.live.com/signup.aspx?id=60969
Subject: RE: [rt.cpan.org #56360] AutoReply: SSHAuthenticationError is a false positive error!
Date: Wed, 7 Apr 2010 21:09:04 +0200
To: <bug-net-ssh-expect [...] rt.cpan.org>
From: Tebano epaminonda <l_epa_m_inonda [...] hotmail.com>
Tested also onto Ubuntu 8.04 Distribution: CPAN.pm: Going to build B/BN/BNEGRAO/Net-SSH-Expect-1.09.tar.gz Perl v5.8.8 Linux Linux 2.6.22-14-generic #1 SMP Show quoted text
> Subject: [rt.cpan.org #56360] AutoReply: SSHAuthenticationError is a false positive error! > From: bug-Net-SSH-Expect@rt.cpan.org > To: l_epa_m_inonda@hotmail.com > Date: Wed, 7 Apr 2010 14:48:22 -0400 > > > Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "SSHAuthenticationError is a false positive error!", > a summary of which appears below. > > There is no need to reply to this message right now. Your ticket has been > assigned an ID of [rt.cpan.org #56360]. Your ticket is accessible > on the web at: > > https://rt.cpan.org/Ticket/Display.html?id=56360 > > Please include the string: > > [rt.cpan.org #56360] > > in the subject line of all future correspondence about this issue. To do so, > you may reply to this message. > > Thank you, > bug-Net-SSH-Expect@rt.cpan.org > > ------------------------------------------------------------------------- > > Hi, > I'm trying to use the perl module Net::SSH::Expect. > I've tryed on many platforms; result is always the same: > > > SSHAuthenticationError Error: Bad password [@esx1:~[root@esx1 ~]# ] at /usr/perl5/site_perl/5.8.4/Expect.pm line 760 > > > > But how You can see from report of failed login, > > > [@esx1:~[root@esx1 ~]# ] > > > it wasn't failed!!! > > > Here the code I'm using: > > > --------------------------------------------------------------------------------------------------------------------------- > #!/usr/bin/perl -w > # Esegui script distribuito > use Net::SSH::Expect; > # SOME VARIABLES > $linea = 0; > $miofile = "/tmp/listanodi"; > $tuofile = "/tmp/script"; > $user = "root"; > $password = "password"; > # > open(MYFILE, "$miofile") || die("cannot open user file /tmp/listanodi"); > # > foreach $linea (<MYFILE>) > { > print $linea; > chomp($linea); > # -- set up a new ssh connection > my $ssh = Net::SSH::Expect->new( > host => "$linea", > password => "$password", > user => "$user", > raw_pty => 1, > timeout => 10 > ); > # -- authenticate > my $login_output = $ssh->login("$linea", "$user", "$password"); > if ($login_output !~ /Last login/) { > die "Login has failed. Login output was $login_output"; > }; > $ssh->exec("stty raw -echo"); > # -- execute the command > my($stdout, $stderr, $exit) = $ssh->exec("ls -l $tuofile"); > }; > close(MYFILE); > # > exit; > > > --------------------------------------------------------------------------------------------------------------------------- > > > > Into the block: > # -- authenticate > is the problem; Expect.pm line 760 report a failed login instead of a correct one, also if I try to bypass the problem saying "it's all right!"... > > > > > > Distribution: > > CPAN.pm: Going to build B/BN/BNEGRAO/Net-SSH-Expect-1.09.tar.gz > > > Perl v5.8.4 > > > SunOS SunOS 5.11 snv_98 i86pc i386 i86pc > > > -------------------------------------------------------------------------------------------------------------------------- > > But I've tryed also on many Linux flavour, before try it on Solaris, without success (same problem!): Ubuntu 9.10; OpenSuse 11.2; Slackware 12.1 > > I say You that, because in these Linux ones, there are perl 5.10 and a release of Cpan higher than that one... > > Can You help me? > Thanks. > cheers, > Tebano. > > _________________________________________________________________ > Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. > https://signup.live.com/signup.aspx?id=60969
Show quoted text
_________________________________________________________________ Hotmail: Trusted email with powerful SPAM protection. https://signup.live.com/signup.aspx?id=60969