Did you get information about the used protocol when you got username and password?
I'd try the easiest method first. Issue AUTH SSL before sending username and password in an normal ftp-session.
I never had to use FTP over SSH - its basically tunneling normal FTP over an ssh-connection.
For FTPS you need a client that can handle that protocol like lftp. Opening a connection with lftp could look like this:
Which option did you try? AUTH SSL or ftps?
For ftps you need a version of lftp compiled with tls support. This one for example supports ftps transfers:
$ lftp -v
LFTP | Version 3.7.3 | Copyright (c) 1996-2008 Alexander V. Lukyanov
LFTP is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
There is absolutely no warranty for LFTP. See COPYING for details.
Send bug reports and questions to <lftp@uniyar.ac.ru>.
Libraries used: Readline 5.2, GnuTLS 2.4.2, zlib 1.2.3.3
Sorry for not mentioning that. I tried ftps option with lftp. I too have the utility though the version looks little older than yours :
-------------------------
LFTP | Version 3.5.1 | Copyright (c) 1996-2006 Alexander V. Lukyanov
LFTP is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
There is absolutely no warranty for LFTP. See COPYING for details.
Send bug reports and questions to <lftp@uniyar.ac.ru>.
Libraries used: Readline 5.1
-----------------------------
In the normal ftp session, I am getting below error :
220 Microsoft FTP Service
504 Security mechanism not implemented.
504 Security mechanism not implemented.
KERBEROS_V4 rejected as an authentication type
I am able to connect to FTP using Filezilla on windows with explicit FTP over TLS option.
@Cero : Where should I put that ? 'AUTH SSL'. I tried putting it on FTP console, it came back with an error.
The response of curl command is :
* About to connect() to FTPSERVER port 21
* Trying FTPSERVER... connected
* Connected to FTPSERVER (FTPSERVER) port 21
< 220 Microsoft FTP Service
> AUTH SSL
< 234 AUTH command ok. Expecting TLS Negotiation.
* SSL: couldn't set callback!
* Closing connection #0
curl: (35) SSL: couldn't set callback!
Does that mean, it can not FTP explicitly over TLS ?
this means probably , your client does not support tls negotiation.
i guess,ftp server wants to start tls and send message to your ftp client about this.but your ftp client couldnt answer to this.
it says there is an error during ssl connection and returns the error message about try to preapere ssl connection..
---------- Post updated at 04:14 PM ---------- Previous update was at 11:07 AM ----------
I upgraded my version of lftp and now I am able to login to the FTP server.
I have another question around lftp, I need to download files from a particular location. In the lftp command I couldn't find any place where we can specify folder name using ftps.
Does anyone have any example of doing similar thing ?