Prev: Perl IDE ScriptDev V2.3 released
Next: FAQ 6.6 How do I substitute case insensitively on the LHS while preserving case on the RHS?
From: MaggotChild on 28 Oct 2009 12:46 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
From: MaggotChild on 28 Oct 2009 13:13 On Oct 28, 8:46 am, MaggotChild <hsomob1...(a)yahoo.com> wrote: > 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.
From: C.DeRykus on 29 Oct 2009 07:01
On Oct 28, 9:46 am, MaggotChild <hsomob1...(a)yahoo.com> wrote: > 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') -- Charles DeRykus |