Net::SFTP Fails, sftp OK

M

MaggotChild

This just fails unexpectedly. With sftp I can connect no problem:

perl -MNet::SFTP -le'$ftp = Net::SFTP->new("sftp.xj999.com", user =>
"X", password => "Z", debug => 1); print $_->{filename} for $ftp->ls;'
localhost: Reading configuration data /mounts/sysadm/xj/.ssh/config
localhost: Reading configuration data /etc/ssh_config
localhost: Connecting to sftp.xj999.com, port 22.
localhost: Remote protocol version 2.0, remote software version
5.1.3.8 SSH Tectia Server
localhost: Net::SSH::perl Version 1.34, protocol version 2.0.
localhost: No compat match: 5.1.3.8 SSH Tectia Server
localhost: Connection established.
localhost: Sent key-exchange init (KEXINIT), wait response.
localhost: Algorithms, c->s: 3des-cbc hmac-sha1 none
localhost: Algorithms, s->c: 3des-cbc hmac-sha1 none
localhost: Entering Diffie-Hellman Group 1 key exchange.
Broken Pipe


I had some trouble installing Net::SFTP, so I figured maybe it was
the install but, on another machine:

localhost: Reading configuration data /home/xj/.ssh/config
localhost: Reading configuration data /etc/ssh_config
localhost: Connecting to sftp.xj999.com, port 22.
localhost: Remote version string: SSH-2.0-5.1.3.8 SSH Tectia Server

localhost: Remote protocol version 2.0, remote software version
5.1.3.8 SSH Tectia Server
localhost: Net::SSH::perl Version 1.30, protocol version 2.0.
..ocalhost: No compat match: 5.1.3.8 SSH Tectia Server
localhost: Connection established.
localhost: Sent key-exchange init (KEXINIT), wait response.
Connection closed by remote host. at /usr/lib/perl5/site_perl/5.8.8/
Net/SSH/Perl/Kex.pm line 142

These are both v0.10

Also, what's up with the SFTP docs -they suck! Does new() die? How do
I cd, can I cd? How do I close the connection?

Thanks
 
M

MaggotChild

This just fails unexpectedly. With sftp I can connect no problem:

 perl -MNet::SFTP -le'$ftp = Net::SFTP->new("sftp.xj999.com", user =>
"X", password => "Z", debug => 1); print $_->{filename} for $ftp->ls;'
localhost: Reading configuration data /mounts/sysadm/xj/.ssh/config
localhost: Reading configuration data /etc/ssh_config
localhost: Connecting to sftp.xj999.com, port 22.
localhost: Remote protocol version 2.0, remote software version
5.1.3.8 SSH Tectia Server
localhost: Net::SSH::perl Version 1.34, protocol version 2.0.
localhost: No compat match: 5.1.3.8 SSH Tectia Server
localhost: Connection established.
localhost: Sent key-exchange init (KEXINIT), wait response.
localhost: Algorithms, c->s: 3des-cbc hmac-sha1 none
localhost: Algorithms, s->c: 3des-cbc hmac-sha1 none
localhost: Entering Diffie-Hellman Group 1 key exchange.
Broken Pipe

Trying to use version SSH 1 I get:

Can't locate object method "_session_channel" via package
"Net::SSH::perl::SSH1" at /usr/lib/perl5/site_perl/5.8.8/Net/SFTP.pm
line 78.

maybe *both* my installs are screwed up.
 
C

C.DeRykus

This just fails unexpectedly. With sftp I can connect no problem:

 perl -MNet::SFTP -le'$ftp = Net::SFTP->new("sftp.xj999.com", user =>
"X", password => "Z", debug => 1); print $_->{filename} for $ftp->ls;'
localhost: Reading configuration data /mounts/sysadm/xj/.ssh/config
localhost: Reading configuration data /etc/ssh_config
localhost: Connecting to sftp.xj999.com, port 22.
localhost: Remote protocol version 2.0, remote software version
5.1.3.8 SSH Tectia Server
localhost: Net::SSH::perl Version 1.34, protocol version 2.0.
localhost: No compat match: 5.1.3.8 SSH Tectia Server
localhost: Connection established.
localhost: Sent key-exchange init (KEXINIT), wait response.
localhost: Algorithms, c->s: 3des-cbc hmac-sha1 none
localhost: Algorithms, s->c: 3des-cbc hmac-sha1 none
localhost: Entering Diffie-Hellman Group 1 key exchange.
Broken Pipe

I had some trouble installing Net::SFTP, so I figured  maybe it was
the install but, on another machine:

localhost: Reading configuration data /home/xj/.ssh/config
localhost: Reading configuration data /etc/ssh_config
localhost: Connecting to sftp.xj999.com, port 22.
localhost: Remote version string: SSH-2.0-5.1.3.8 SSH Tectia Server

localhost: Remote protocol version 2.0, remote software version
5.1.3.8 SSH Tectia Server
localhost: Net::SSH::perl Version 1.30, protocol version 2.0.
.ocalhost: No compat match: 5.1.3.8 SSH Tectia Server
localhost: Connection established.
localhost: Sent key-exchange init (KEXINIT), wait response.
Connection closed by remote host. at /usr/lib/perl5/site_perl/5.8.8/
Net/SSH/Perl/Kex.pm line 142

These are both v0.10

Sorry don't know but a quick Google filtered lookup
using the exact phrase:

Can't locate object method "_session_channel"

has a thread about possible Win32 install related
problems that might be helpful.
Also, what's up with the SFTP docs -they suck! Does new() die? How do
I cd, can I cd? How do I close the connection?

Sounds like you may need to eval wrap new() to catch fatalities..
There're examples in the /eg distro directory and a mailing list for
usage questions. See SUPPORT in the docs. Also I see SFTP only
implements a subset of SSH FTP protocol commands. This is mentioned
in the docs as well. (Alternatively, Net::SCP does provide a 'cwd')
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,704
Messages
2,569,334
Members
44,615
Latest member
neveseexick

Latest Threads

Top