Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any free SFTP gizmos out there?
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01344675
Message ID:
01356054
Views:
41
>I'm trying to use this to upload to a sFTP site. This is what I'm getting:
>
>0 About to connect() to ftp1.xx.xx.org port 21 (#0)
>0 Trying 10.xxx.xx.xxx...
>0 connected
>0 Connected to ftp1.xx.xx.org (10.xxx.xx.xxx) port 21 (#0)
>1 220 ftp1.xx.xx.xxx FTP server (NcFTPd 2.2.2) ready.
>2 AUTH SSL
>1 500 Syntax error, command unrecognized.
>2 AUTH TLS
>1 500 Syntax error, command unrecognized.
>0 Closing connection #0
>0 Requested SSL level failed
>
>I've tried to step though the .prg - but just not having much luck figuring out where my 'syntax error' is - you have any ideas?
>
>Thanks!
>
>
Victor:

It seems that the FTP server you are connecting to is using this FTP server software: http://www.ncftp.com/ncftpd

It seems that FTP server software does not support FTP over TLS/SSL. This is the FTP flavor you are trying to use based on your debug output.

When libcurl issues the FTP commands "AUTH SSL" and "AUTH TLS", the FTP server on the other side does not recognize those as valid commands.

So the "syntax error" you are getting is not a "syntax error" in your VFP code, it is just the way the FTP server has of telling you "I have no idea what you are asking me to do"

You may want to issue the FtpGetFeatures method on the FTP server to see if it supports any form of encryption. This is the output from a FileZilla server for example:
MDTM|REST STREAM|SIZE|MLST type*;size*;modify*;|MLSD|AUTH SSL|AUTH TLS|UTF8|CLNT|MFMT
See how AUTH SSL|AUTH TLS are included in the string.

The is a great deal of confussion as to what sFTP, FTPS really are:
http://en.wikipedia.org/wiki/SSH_file_transfer_protocol
http://en.wikipedia.org/wiki/FTPS

I have even seen some people calling passive FTP "Secure FTP",

It seems you are using CurlOptUseSsl = CURLUSESSL_ALL, set it to CURLUSESSL_TRY and see if it works.

Carlos Alloatti
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform