[Ssh-sftp-perl-users] Net::SFTP dies on channel 1
Brought to you by:
dbrobins
From: Chris L. <cp...@st...> - 2004-07-23 07:23:12
|
The following snippet of code works fine if I set it loose on localhost (openssh on linux): use Net::SFTP; use Data::Dump qw(dump); my %args = (ssh_args => []); $args{user} = $user; $args{password} = $pass; $args{debug} = 1; #push @{ $args{ssh_args} }, protocol => 2; my $sftp = Net::SFTP->new($host,%args); # line 13 dump $sftp->ls("."); But if I take aim at a remote SFTP server (cygwin/openssh on windows server 2003), the code above always dies in the same way: myhost: Login completed, opening dummy shell channel. myhost: channel 0: new [client-session] myhost: Requesting channel_open for channel 0. myhost: channel 0: open confirm rwindow 0 rmax 32768 myhost: Got channel open confirmation, requesting shell. myhost: Requesting service shell on channel 0. myhost: channel 1: new [client-session] myhost: Requesting channel_open for channel 1. myhost: Sending subsystem: sftp myhost: Requesting service subsystem on channel 1. myhost: channel 1: open confirm rwindow 0 rmax 32768 myhost: sftp: Sending SSH2_FXP_INIT myhost: channel 1: rcvd eof myhost: channel 1: output open -> drain myhost: channel 1: rcvd close myhost: channel 1: input open -> closed myhost: channel 1: close_read myhost: channel 1: obuf empty myhost: channel 1: output drain -> closed myhost: channel 1: close_write myhost: channel 1: send close myhost: channel 1: full closed Connection closed at ./test.pl line 13 Logging in using the command line 'sftp' utility works fine when accessing the same remote windows server 2003 server (the one connection remains stable for hours), so I'm at a bit of a loose end. One thing I noticed when using the sftp utility though is that all communications stay on channel 0. I went thru the OpenBSD ssh_config (5) manpage looking for options to disable channel 1 usage but came up blank. Any tips? Regards Chris Langlands |