[Ssh-sftp-perl-users] Net::SFTP - 2 Bugs
Brought to you by:
dbrobins
From: Stefan G. <st...@zi...> - 2005-07-19 10:04:05
|
Hi, I am testing Net::SFTP. I am doing this on Slackware 10.0 and on Slackware-current. both with perl 5.8.4. I am seeing 2 problems I made a simple test script ---- 1 #!/usr/bin/perl -w 2 use strict; 3 use Net::SFTP; 4 my( $host, $userName, $passWord , %args); 5 6 $host = "localhost"; 7 $userName = "root"; 8 $passWord = "Re9RaG1duN"; 9 10 $args{user} = $userName; 11 $args{password} = $passWord; 12 13 my $sftp = Net::SFTP->new($host, %args); 14 $sftp->ls( ".", sub { print "++ ", $_[0]->{longname}, "\n" } ); ----- Problem 1 --------- I have a file ~/.ssh/config this faile contains ---- host AnyDumbHost User NoSuchUser ---- If i run my script i get following problem. $ ./sftp-test Received disconnect message: Too many authentication failures for NoSuchUser at /usr/lib/perl5/site_perl/5.8.4/Net/SSH/Perl/AuthMgr.pm line 142 $ When i remove this file the script works fine. Problem 2 --------- Same script (no ~/.ssh/config file) I start the script and immediately pres Enter at least once. $ ./sftp-test <---- Enter pressed in shell Connection closed at ./sftp-test line 14 $ line 565 in SFTP.pm croak "Connection closed" unless $buf->length > 4; aparently the buffer gets filled from STDIN with the Enter and that ruins the script. I hope this info can be usefull to make Net::SFTP better. Thanks for a nice piece of software! Stefan Goethals. |