Topic "is WinSCP RFC 2228 compliant?"

Author Message
suzieQ

Guest


I need to write a script but requirements are that the client is RFC2228 compliant.
Is WinSCP compliant?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
I cannot give yes/no answer to this. There are no required commads in RFC2228, it introduces only optional commands. So the question is, what optional functionality of RFC2228 are you required to use?

WinSCP implements these commands from RFC2228: AUTH (SSL and TLS), PROT (always P) and PBSZ (always 0).
suzieQ

Guest


I have a simple script to connect to a sftp site to grap a file.
when I manually connect via UI, it works perfect. when I test manually when in the WinSCP folder it does not connect.
I went back to the owner of the SFTP site and they said if I am scripting it needs to be RFC2228 compliant.

So how would I incorporate the commands you listed into the script?

ex of script--
option batch abort
option confirm off
open sftp://username:password@sftpsite.com -hostkey="ssh-rsa XXXXX"
option transfer binary
get file
close
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
You are connecting with SFTP protocol. RFC2228 is about Secure FTP (FTPS).
See http://winscp.net/eng/docs/ftps

So use ftps:// instead of sftp://. Also, you are probably supposed to use explicit TLS, so add -explicittls parameter. + There's no -hostkey for FTPS.
_________________
Martin Prikryl
suzieQ

Guest


ok, but even before running the script I can't connect. Maybe I'm just lost here...

I navigate into the following to test---
C:\WinSCP>WinSCP.com
winscp> open
Host: sftp site
Network error: Connection timed out.
winscp>

Even when I changed the script to ftps and remove the hostkey and put -explicittls, it doesn't run.
frankly it can't even pass connecting to the site. is it b/c I'm using DOS to test?

this is what I get--
C:\WinSCP>WinSCP.com /script=script.bat
batch abort
confirm off
Connecting to sftpsite.com...
Connection failed.
Timeout detected.
Connection failed.


updated script--
option batch abort
option confirm off
open ftps://Username:password@sftpsite.com -explicittls
option transfer binary
get file
close
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
suzieQ wrote:
I navigate into the following to test---
C:\WinSCP>WinSCP.com
winscp> open
Host: sftp site
Network error: Connection timed out.
winscp>

WinSCP defaults to SFTP, so here you are connecting with SFTP again.

Quote:
Even when I changed the script to ftps and remove the hostkey and put -explicittls, it doesn't run.
frankly it can't even pass connecting to the site. is it b/c I'm using DOS to test?

Sorry, I cannot help you to find out what protocol/hostname or port number you are supposed to use. Please ask your server administrator.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License