Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I am a beginner in perl, i am trying to get a file from remote machine using Net::SSH2 scp_get method. To get a small size file it's working fine, but when i try for getting any file greater than 1.5 MB then it gives a error message and quits or it just hangs up continuously & at times it even fails for small files also, can you please let me know where am i going wrong in implementing the script.
my $ssh2 = Net::SSH2->new(); $ssh2->debug(1); $ssh2->connect($host) or die " Cannot connect to 219 "; die " Username/password is wrong " unless $ssh2->auth(username=>$user, + password=>$password); $ssh2->scp_get('/path/somefile'); print " Successfully copied \n"; print $ssh2->error; $ssh2->disconnect();
Error Message:
Net::SSH2::Channel::read(size = 8192, ext = 0) - read 2972 bytes - read 4172 bytes - read -37 bytes - read 7144 total -24LIBSSH2_ERROR_CHANNEL_WINDOW_EXCEEDED in Net::SSH2
Thanks in advance
pradeep
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SSH2 fails for scp_get method
by Gangabass (Vicar) on Sep 05, 2007 at 00:48 UTC | |
|
Re: Net::SSH2 fails for scp_get method----solution
by zentara (Cardinal) on Jun 20, 2012 at 14:39 UTC |