I've tried using both WinSCP.exe and WinSCP.com 5.0.5 to download a file using FTPS but can't get it to work. I'm able to connect to the FTP server, but I can't download nor list any files on the FTP site. I did accept this FTP server's certificate by answering Yes the first time I connected to it. I'm running WinSCP on Windows XP.
(Note: I'm able to download that file on a linux box when I use lftp; however, I can no longer use that box and need to do this on a Windows box)
You're help would be greatly appreciated!
Here's what I tried using WinSCP.com
winscp> open ftps://userid:password@ftp.myhost.net -passive=on -explicitssl
Connecting to ftp.myhost.net ...
Connected with ftp.myhost.net, negotiating SSL connection...
SSL connection established. Waiting for welcome message...
Connected
Starting the session...
Reading remote directory...
Session started.
Active session: [1] userid@ftp.myhost.net
winscp> cd my_dir
/my_dir
winscp> get 20111114.FI1 c:\tmp\20111114.FI1
Connecting to ftp.myhost.net ...
Connected with ftp.myhost.net, negotiating SSL connection...
SSL connection established. Waiting for welcome message...
Connected
Starting the session...
Reading remote directory...
Session started.
Can't get attributes of file '20111114.FI1'.
Invalid access to memory
winscp>
Here's an automation script I tried doing the same thing and unable to download the file.
winscp.exe /console /script=c:\tmp\auto.txt /log=c:\tmp\winscp.log
auto.txt
open ftps://userid:password@ftp.myhost.net -explicitssl -passive=on
option transfer ascii
cd my_dir
get 20111114.FI1 c:\tmp\20111114.FI1
close
exit
And lastly, here's my log file from this exercise.
. 2011-11-16 10:44:00.788 --------------------------------------------------------------------------
. 2011-11-16 10:44:00.788 WinSCP Version 5.0.5 (Build 1782) (OS 5.1.2600 Service Pack 3)
. 2011-11-16 10:44:00.788 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2011-11-16 10:44:00.788 Local account: MY_DOM\myuserid
. 2011-11-16 10:44:00.788 Login time: Wednesday, November 16, 2011 10:44:00 AM
. 2011-11-16 10:44:00.788 --------------------------------------------------------------------------
. 2011-11-16 10:44:00.788 Session name: userid@ftp.myhost.net (Modified stored session)
. 2011-11-16 10:44:00.788 Host name: ftp.myhost.net (Port: 21)
. 2011-11-16 10:44:00.788 User name: userid (Password: Yes, Key file: No)
. 2011-11-16 10:44:00.788 Tunnel: No
. 2011-11-16 10:44:00.788 Transfer Protocol: FTP
. 2011-11-16 10:44:00.788 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2011-11-16 10:44:00.788 Proxy: none
. 2011-11-16 10:44:00.788 FTP: FTPS: Explicit SSL; Passive: Yes [Force IP: No]
. 2011-11-16 10:44:00.788 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2011-11-16 10:44:00.788 Cache directory changes: Yes, Permanent: Yes
. 2011-11-16 10:44:00.788 DST mode: 1
. 2011-11-16 10:44:00.788 --------------------------------------------------------------------------
. 2011-11-16 10:44:00.788 Connecting to ftp.myhost.net ...
. 2011-11-16 10:44:00.882 Connected with ftp.myhost.net, negotiating SSL connection...
< 2011-11-16 10:44:00.975 220 EFT Server 6.3.8 Build 07.18.2011.2
> 2011-11-16 10:44:00.975 AUTH SSL
< 2011-11-16 10:44:01.069 234 AUTH Command OK. Initializing SSL connection.
. 2011-11-16 10:44:01.382 SSL connection established. Waiting for welcome message...
> 2011-11-16 10:44:01.382 USER userid
< 2011-11-16 10:44:01.460 331 Password required for userid.
> 2011-11-16 10:44:01.460 PASS ********
< 2011-11-16 10:44:01.553 230 Login OK. Proceed.
> 2011-11-16 10:44:01.553 SYST
< 2011-11-16 10:44:01.632 215 UNIX Type: L8
> 2011-11-16 10:44:01.632 FEAT
< 2011-11-16 10:44:01.725 211-Features supported:
< 2011-11-16 10:44:01.725 COMB target;source_list
< 2011-11-16 10:44:01.725 REST STREAM
< 2011-11-16 10:44:01.725 SIZE
< 2011-11-16 10:44:01.725 MDTM
< 2011-11-16 10:44:01.725 XCRC filename;start;end
< 2011-11-16 10:44:01.725 SSCN
< 2011-11-16 10:44:01.725 MLST Size*;Modify*;Create;Type*;Unique;Perm*;Lang;Media-Type;CharSet;
< 2011-11-16 10:44:01.725 XNOP
< 2011-11-16 10:44:01.725 211 END
> 2011-11-16 10:44:01.725 PBSZ 0
< 2011-11-16 10:44:01.803 200 PBSZ Command OK. Protection buffer size set to 0.
> 2011-11-16 10:44:01.803 PROT P
< 2011-11-16 10:44:01.897 200 PROT Command OK. Using Private data connection
. 2011-11-16 10:44:01.897 Connected
. 2011-11-16 10:44:01.897 --------------------------------------------------------------------------
. 2011-11-16 10:44:01.897 Using FTP protocol.
. 2011-11-16 10:44:01.897 Doing startup conversation with host.
> 2011-11-16 10:44:01.897 PWD
< 2011-11-16 10:44:01.975 257 "/" is current folder.
. 2011-11-16 10:44:01.975 Getting current directory name.
. 2011-11-16 10:44:01.975 Startup conversation with host finished.
< 2011-11-16 10:44:01.975 Script: Active session: [1] userid@ftp.myhost.net
> 2011-11-16 10:44:01.991 Script: option transfer ascii
< 2011-11-16 10:44:01.991 Script: transfer ascii
> 2011-11-16 10:44:01.991 Script: cd my_dir
. 2011-11-16 10:44:01.991 Changing directory to "my_dir".
> 2011-11-16 10:44:01.991 CWD my_dir
< 2011-11-16 10:44:02.069 250 Folder changed to "/my_dir".
. 2011-11-16 10:44:02.069 Getting current directory name.
> 2011-11-16 10:44:02.069 PWD
< 2011-11-16 10:44:02.163 257 "/my_dir" is current folder.
< 2011-11-16 10:44:02.163 Script: /my_dir
> 2011-11-16 10:44:02.163 Script: get 20111114.FI1 c:\tmp\20111114.FI1
. 2011-11-16 10:44:02.163 Listing file "20111114.FI1".
. 2011-11-16 10:44:02.163 Retrieving directory listing...
> 2011-11-16 10:44:02.163 TYPE A
< 2011-11-16 10:44:02.257 200 Type set to A.
> 2011-11-16 10:44:02.257 PASV
< 2011-11-16 10:44:02.335 227 Entering Passive Mode (12,129,26,30,117,48).
> 2011-11-16 10:44:02.335 LIST -a
< 2011-11-16 10:44:02.428 150 Opening ASCII mode data connection for file list.
. 2011-11-16 10:44:17.788 Timeout detected.
. 2011-11-16 10:44:17.788 Could not retrieve directory listing
< 2011-11-16 10:44:17.788 Script: Connecting to ftp.myhost.net ...
. 2011-11-16 10:44:17.788 Connecting to ftp.myhost.net ...
< 2011-11-16 10:44:17.866 Script: Connected with ftp.myhost.net, negotiating SSL connection...
. 2011-11-16 10:44:17.866 Connected with ftp.myhost.net, negotiating SSL connection...
< 2011-11-16 10:44:17.959 220 EFT Server 6.3.8 Build 07.18.2011.2
> 2011-11-16 10:44:17.959 AUTH SSL
< 2011-11-16 10:44:18.053 234 AUTH Command OK. Initializing SSL connection.
< 2011-11-16 10:44:18.241 Script: SSL connection established. Waiting for welcome message...
. 2011-11-16 10:44:18.241 SSL connection established. Waiting for welcome message...
> 2011-11-16 10:44:18.241 USER userid
< 2011-11-16 10:44:18.334 331 Password required for userid.
> 2011-11-16 10:44:18.334 PASS ********
< 2011-11-16 10:44:18.444 230 Login OK. Proceed.
> 2011-11-16 10:44:18.444 SYST
< 2011-11-16 10:44:18.538 215 UNIX Type: L8
> 2011-11-16 10:44:18.538 FEAT
< 2011-11-16 10:44:18.616 211-Features supported:
< 2011-11-16 10:44:18.616 COMB target;source_list
< 2011-11-16 10:44:18.616 REST STREAM
< 2011-11-16 10:44:18.616 SIZE
< 2011-11-16 10:44:18.616 MDTM
< 2011-11-16 10:44:18.616 XCRC filename;start;end
< 2011-11-16 10:44:18.616 SSCN
< 2011-11-16 10:44:18.616 MLST Size*;Modify*;Create;Type*;Unique;Perm*;Lang;Media-Type;CharSet;
< 2011-11-16 10:44:18.616 XNOP
< 2011-11-16 10:44:18.616 211 END
> 2011-11-16 10:44:18.616 PBSZ 0
< 2011-11-16 10:44:18.709 200 PBSZ Command OK. Protection buffer size set to 0.
> 2011-11-16 10:44:18.709 PROT P
< 2011-11-16 10:44:18.803 200 PROT Command OK. Using Private data connection
< 2011-11-16 10:44:18.803 Script: Connected
. 2011-11-16 10:44:18.803 Connected
. 2011-11-16 10:44:18.803 Doing startup conversation with host.
< 2011-11-16 10:44:18.803 Script: Starting the session...
> 2011-11-16 10:44:18.803 PWD
< 2011-11-16 10:44:18.881 257 "/" is current folder.
< 2011-11-16 10:44:18.881 Script: Reading remote directory...
. 2011-11-16 10:44:18.881 Changing directory to "/my_dir".
> 2011-11-16 10:44:18.881 CWD /my_dir
< 2011-11-16 10:44:18.991 250 Folder changed to "/my_dir".
. 2011-11-16 10:44:18.991 Getting current directory name.
> 2011-11-16 10:44:18.991 PWD
< 2011-11-16 10:44:19.069 257 "/my_dir" is current folder.
. 2011-11-16 10:44:19.069 Startup conversation with host finished.
< 2011-11-16 10:44:19.069 Script: Session started.