Go Back   FlashFXP Forums > FlashFXP > Release Archive > Website

Website Comments, Suggestions, Questions, Concerns, Fan mail, Hate mail, Whatever goes.

 
 
Thread Tools
Old 02-27-2005, 07:23 PM   #1
Junior Member
 
Join Date: Feb 2005
Posts: 4
Default Net::SFTP module in Perl

Hey,

Anyone here that have installed Net::SFTP module in perl and actually made it work? I get as far as this:

>perl SFTPTest.pl
slackware: Reading configuration data ~/.ssh/config
slackware: Reading configuration data /etc/ssh_config
slackware: Connecting to localhost, port 21.
slackware: Socket created, turning on blocking...
slackware: Remote protocol version ., remote software version
slackware: Net::SSH::Perl Version 1.23_01, protocol version 2.0.
slackware: No compat match: .
slackware: Connection established.
slackware: Sent key-exchange init (KEXINIT), wait response.
Bad packet length 892350496 at /usr/lib/perl5/site_perl/5.8.x/Net/SSH/Perl/Packet.pm line 175

And I have to "hardcode" stuff like choosing SSH2! But, it would be nice if someone had some fix for this, or even a step-by-step guide how to do it all from scratch. Since perl is so powerfull as it is, I prefer scripting in that instead of bash and tcl.

Also, I'm not sure how to create the damn keys to use. Anyone here that can help me with that too? I _think_ the problem here is/are the key(s)!

Script looks like this:
Code:
#!/usr/bin/perl -w

use Net::SFTP;
use strict;

my $host = "localhost";
my $user = "ace";
my $pass = "temp";
my $port = 21;

my %args = (ssh_args => []);
$args{user} = $user;
$args{password} = $pass;
$args{debug} = 1;
$args{protocol} = '2,1';

push @{ $args{ssh_args} }, port => $port;
my $sftp = Net::SFTP->new($host, %args);
Thanks,
Ace
Ace128 is offline  
Old 02-27-2005, 07:27 PM   #2
Too much time...
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: May 2003
Posts: 1,364
Default

Use Net::FTP not Net::SFTP, ioFTPD is not an SFTP daemon. If you're connecting to ioFTPD that is, if you're not - why are you posting here?
neoxed is offline  
Old 02-27-2005, 07:29 PM   #3
Junior Member
 
Join Date: Feb 2005
Posts: 4
Default

Quote:
Originally posted by NeoXed
Use Net::FTP not Net::SFTP, ioFTPD is not an SFTP daemon. If you're connecting to ioFTPD that is, if you're not - why are you posting here?
ioFTPD supports SSL does it not?
Using that module with Perl, Im gonna be able to login to the ioFTPD site.
Ace128 is offline  
Old 02-27-2005, 08:28 PM   #4
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 2,022
Default

No, you're not.
SSL FTP and SFTP are two different things.
SFTP use SSH.
SSL FTP use encrypted FTP commands (and/or data).
Mouton is offline  
Old 02-27-2005, 08:29 PM   #5
Junior Member
 
Join Date: Feb 2005
Posts: 4
Default

Quote:
Originally posted by Mouton
No, you're not.
SSL FTP and SFTP are two different things.
SFTP use SSH.
SSL FTP use encrypted FTP commands (and/or data).
Hmm, thats interesting... So, u're saying this module wont work with io?
Ace128 is offline  
Old 02-27-2005, 11:07 PM   #6
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 2,022
Default

Quote:
Originally posted by NeoXed
Use Net::FTP not Net::SFTP, ioFTPD is not an SFTP daemon.
Or more clearly: no, ioFTPD is NOT a SFTP server, so trying to connect to it using a SFTP client module (Net:SFTP) will NOT work.
Mouton is offline  
Old 02-28-2005, 02:54 PM   #7
Junior Member
 
Join Date: Feb 2005
Posts: 4
Default

Quote:
Originally posted by Mouton
No, you're not.
SSL FTP and SFTP are two different things.
SFTP use SSH.
SSL FTP use encrypted FTP commands (and/or data).
Ahh! But using SSH the data gets encrypted... no?

Edit: SSL FTP = FTPS != SFTP No wonder I was confused...

Edit2: My god, why didt I come over this earlier: http://www.enterprisedt.com/products...q-answers.html

" There is considerable confusion when using the term "secure FTP". There are two different types of secure file transfer protocols available.

Firstly, there is an enhancement to standard FTP (as defined in RFC 959), which uses the same FTP commands (and protocol) over secure sockets, i.e. over SSL/TLS. This is implemented by edtFTPj/SSL. This is variously known as FTPS, FTP-SSL, and FTP-over-SSL. There are many FTP servers that support FTPS.

There is also another protocol, unfortunately known as SFTP, which also provides secure file access, but which is not related to the standard FTP protocol. This is implemented using SSH (Secure SHell), a suite of secure network connectivity tools (when used with SSH2 this is known as SFTP). The primary purpose of SSH is to enable users to remotely log into a machine over a secure connection. The two protocols are completely different and not related. For a comparison see the FTPS vs SFTP FAQ below. "
Ace128 is offline  
 
Create a free account to browse our forums without ads



Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -5. The time now is 01:48 AM.