FTPS is an extension to the commonly used FTP that adds support for the Transport Layer Security (TLS) and the Secure Sockets Layer (SSL) cryptographic protocols.
While FTPS using clients like FileZilla, we generally prefix our host with ‘ftpes://’:
Net::SSH is the most popular ruby library for ssh and ftp purpose. It however is not so helpful when it comes to FTPS. We will use Net::FTPFXP RubyGem instead.
Installing Net::FTPFXP is simple. Run:
gem install ftpfxp
Now to establish the connection, do the following:
ftp = Net::FTPTLS.new()
ftp.passive = true
Port number by default is 21.