[Ssh-sftp-perl-users] Single channel SFTP connection...
Brought to you by:
dbrobins
From: Stephen N. <st...@st...> - 2004-04-19 16:03:00
|
Hello, I'm trying to use Net::SFTP against an SFTP-only server (doesn't do SSH shell access, only SFTP). The server expects commands on the first channel you connect on (channel 0), but whenever I connect with Net::SFTP, it always sends commands over a second channel (channel 1). This appears to be happening because Net::SSH::Perl opens up a "dummy" shell connection on the first channel. Since the SFTP server is waiting for commands on channel 0, I can't get any further than authentication. I've tried commenting out the code in Net::SSH:Perl which opens a channel after authentication, in the hopes that Net::SFTP's new connection will be channel 0. This works to a point (Net::SFTP's connection is indeed channel 0), but as soon as Net::SFTP issues an SSH2_FXP_INIT command, the program dies with the following errors: Use of uninitialized value in numeric gt (>) at /usr/local/lib/perl5/site_perl/5.8.1/Net/SSH/Perl/Channel.pm line 85. Use of uninitialized value in pack at /usr/local/lib/perl5/site_perl/5.8.1/Net/SSH/Perl/Buffer.pm line 105. Connection closed at netsftptest.pl line 22 Connecting to the SFTP server with OpenSSH's SFTP client works correctly. The client opens up only the single channel 0 connection, and is able to fully connect to the server without a problem. Is there any way to get Net::SFTP/Net::SSH::Perl to do the same thing? Thanks in advance! --Steve |