Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect to a FTPS server within shell script

Tags:

shell

ftp

I'm trying to connect to a FTPS (explicit TLS FTP) server within a shell script and i'm kinda confused. I tried using the regular FTP command, but i get 534 error "policy requires SSL" and 504 "Security mechanism not implemented"

ftp -inuv myhost

Returns 504 then

quote USER myuser

Returns 534

I also tried sftp but i get "couldn't read packet: connection reset by peer". That damn peer is making my life a nightmare since IRC ;)

sftp myuser@myhost:mydirectory/ -P21

Connexion reset by peer and it says it can't connect to port 22, which is weird since i specified port 21...

Thanks for your help

like image 617
user1159791 Avatar asked Jan 27 '26 16:01

user1159791


1 Answers

There is a diference between ftps and sftp : sftp is ftp over ssh, so in your case you cannot use sftp. ftps is ftp that use ssl/tls

You need an ftp client that manages TLS, for instance http://lftp.yar.ru/ (found on the net)

like image 53
krampstudio Avatar answered Jan 30 '26 10:01

krampstudio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!