Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: How to do a command line explict TLS connection.

nischal wrote:

I need to do the same thing. Can you share your script please.

See documentation:
https://winscp.net/eng/docs/scriptcommand_open

open ftp://<username>@<host> -explicittls
nischal

Re: How to do a command line explict TLS connection.

I need to do the same thing. Can you share your script please.

Thanks
jholly

never mind, I got it.
jholly

How to do a command line explict TLS connection.

Using 5.1.4.3020

I want to do a windows command line connect and transfer. My ISP changed requirements and I need to use FTPS. An example for Filezilla shows:
Protocol FTP with explict TLS

I used:
winSCP /script=myscript /explicttls /log=mylogfile.

The error I get is:
[code]
2013-03-04 21:23:07.835 WinSCP Version 5.1.4 (Build 3020) (OS 6.1.7601 Service Pack 1)
. 2013-03-04 21:23:07.835 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2013-03-04 21:23:07.835 Local account: flexo\jholly
. 2013-03-04 21:23:07.835 Working directory: C:\Users\jholly\AppData\Roaming\gsak8
. 2013-03-04 21:23:07.835 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /console=514 /consoleinstance=_6792_850 "/script=C:\myscriptfiledirectory\ftpcmd.bat" "/explicittls" "/log=C:\mylogfiledirectory\ftp.out"
. 2013-03-04 21:23:07.835 Time zone: Current: GMT-8, Standard: GMT-8, DST: GMT-7, DST Start: 3/10/2013, DST End: 11/3/2013
. 2013-03-04 21:23:07.835 Login time: Monday, March 04, 2013 9:23:07 PM
. 2013-03-04 21:23:07.835 --------------------------------------------------------------------------
. 2013-03-04 21:23:07.835 Session name: mylogin@myftpserver (Modified stored session)
. 2013-03-04 21:23:07.835 Host name: myftpserver (Port: 990)
. 2013-03-04 21:23:07.835 User name: mylogin (Password: Yes, Key file: No)
. 2013-03-04 21:23:07.835 Tunnel: No
. 2013-03-04 21:23:07.835 Transfer Protocol: FTP
. 2013-03-04 21:23:07.835 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2013-03-04 21:23:07.835 Proxy: none
. 2013-03-04 21:23:07.835 FTP: FTPS: Implicit SSL/TLS; Passive: Yes [Force IP: A]
. 2013-03-04 21:23:07.835 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2013-03-04 21:23:07.835 Cache directory changes: Yes, Permanent: Yes
. 2013-03-04 21:23:07.835 DST mode: 1; Timezone offset: 0h 0m
. 2013-03-04 21:23:07.835 --------------------------------------------------------------------------
. 2013-03-04 21:23:08.147 Connecting to myftpserver:990 ...
. 2013-03-04 21:23:23.040 Timeout detected.
. 2013-03-04 21:23:23.040 Connection failed.
[code]

I captured the command window message and it is

batch on
confirm off
Connecting to myftpserver:990 ...
Connection failed.
Timeout detected.

Connection failed.
No session.


I can login on the windows graphical interface, I did notice it uses port 21 there. How do I get the command line interface to log in?

TIA