Is there an ftp command on linux that works with ftps

Is there an ftp command on linux that works with ftps

Have been trying for 2 hours with lftp commands and any combinations/variations of them but won't connect.

lftp :~> user usr pwd;
lftp usr@:~> set ftp:ssl-force true;
lftp usr@:~> set ftp:ssl-protect-data true;
lftp usr@:~> open ftps://site;
---- Resolving host address...
---- 1 address found: ip.ip.ip.ip//<-I removed that                            
lftp site:~> ls
---- Connecting to site (ip.ip.ip.ip) port 990
**** Socket error (Connection refused) - reconnecting
---- Closing control socket

Changing to port 22 gives me:

gnutls_handshake: A TLS packet with unexpected length was received.

With filezilla I can connect choosing protocol sftp ssh protocol but that doesn't allow me to automate sending a bunch of files in different locations so I have to click myself silly to get them there.

[update]

Any combination of set ftp:ssl-auth TLS-C, set ftp:ssl-auth TLS, set ftp:ssl-auth SSL or combinations without set ftp:ssl-force true; or combinations without set ftp:ssl-protect-data true; give me the same handshake problem when using port 22

Thank you for reading my question and hope you can help.

答案1

when using port 22

Your server doesn't run FTPS on port 22. It runs SFTP. Those aren't the same thing – the former is FTP+TLS, the latter is SSH File Transfer. So the handshake error happens because lftp is trying to talk TLS to an SSH server.

$ lftp
lftp :~> open sftp://localhost
lftp localhost:~> ls /etc
drwxr-xr-x  145 root     root        12288 Oct  3 16:06 .
drwxr-xr-x   22 root     root       122880 Sep 22 17:44 ..

相关内容