swares has asked for the wisdom of the Perl Monks concerning the following question:
$|=1; use Net::SFTP; use Net::SFTP::Recursive qw(:all); use Net::SSH::Perl; $host="somehost"; $user="user"; $password="pass"; $upfile_subdir="/tmp"; $rmt_dir="/home/swares/mgp/installfiles"; print "Setup connection to $host..."; use Net::SFTP::Recursive; my %cfg = ( user=>"$user", password=>"$password", local_dir=>"$upfile_ +subdir", remote_dir=>"$rmt_dir", file_pat=>'.htm$', debug=>1); my $sftp = Net::SFTP::Recursive->new("$host",%cfg); print " Done\n"; print "Get file..."; $sftp->rget("$rmt_dir","$upfile_subdir"); print " Done\n";
# sample debug output swares.ibm.com: Sending subsystem: sftp swares.ibm.com: Requesting service subsystem on channel 1. swares.ibm.com: channel 1: open confirm rwindow 0 rmax 32768 swares.ibm.com: sftp: Sending SSH2_FXP_INIT swares.ibm.com: sftp: Remote version: 3 Done Get file... + from /home/swares/mgp/installfiles to /tmp... swares.ibm.com: sftp: Sent message T:11 I:0 swares.ibm.com: sftp: Sent message T:12 I:1 swares.ibm.com: sftp: Received reply T:104 I:1 swares.ibm.com: sftp: Received 7 SSH2_FXP_NAME responses swares.ibm.com: sftp: Sent message T:12 I:2 swares.ibm.com: sftp: Received reply T:101 I:2 swares.ibm.com: sftp: Received SSH2_FXP_STATUS 1 swares.ibm.com: sftp: Sent message T:4 I:3 + from /home/swares/mgp/installfiles/. to /tmp/.... swares.ibm.com: sftp: Sent message T:11 I:4 swares.ibm.com: sftp: Sent message T:12 I:5 swares.ibm.com: sftp: Received reply T:104 I:5 swares.ibm.com: sftp: Received 7 SSH2_FXP_NAME responses swares.ibm.com: sftp: Sent message T:12 I:6 swares.ibm.com: sftp: Received reply T:101 I:6 swares.ibm.com: sftp: Received SSH2_FXP_STATUS 1 swares.ibm.com: sftp: Sent message T:4 I:7 + from /home/swares/mgp/installfiles/./. to /tmp/./.... swares.ibm.com: sftp: Sent message T:11 I:8 swares.ibm.com: sftp: Sent message T:12 I:9 swares.ibm.com: sftp: Received reply T:104 I:9 swares.ibm.com: sftp: Received 7 SSH2_FXP_NAME responses swares.ibm.com: sftp: Sent message T:12 I:10 swares.ibm.com: sftp: Received reply T:101 I:10 swares.ibm.com: sftp: Received SSH2_FXP_STATUS 1 swares.ibm.com: sftp: Sent message T:4 I:11 + from /home/swares/mgp/installfiles/././. to /tmp/././.... # sample non debug output Setup connection to somehost... Done Get file...Deep recursion on subroutine "Net::SFTP::Recursive::rget" a +t /usr/lib/perl5/site_perl/5.8.0/Net/SFTP/Recursive.pm line 283. Couldn't get handle: Bad message at - line 19 Couldn't get handle: Bad message at - line 19 Couldn't get handle: Bad message at - line 19
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SFTP::Recursive problems
by Anonymous Monk on May 09, 2007 at 09:56 UTC | |
by salva (Canon) on May 09, 2007 at 11:39 UTC | |
by Anonymous Monk on May 10, 2007 at 13:10 UTC | |
by salva (Canon) on May 10, 2007 at 16:10 UTC |