How to connect to FTPS with Node.js?

How can I use node.js to connect to a ftps server (would also be nice to know how to do if for sftp). I have an external server I would like to connect to and it requires ftps connection to upload images.

I found this npm package, but it doesn't seem to handle FTP over SSL/TLS.

For SFTP there's this module:

https://github.com/ajaxorg/node-sftp/tree/master/lib

It's essentially a wrapper around a child process. There's not much in the readme but look in the code for the options.

node-ftp supports FTPS as well as FTP. It's quite popular, pure JS and actively maintained.

Or you could try ftps which is a wrapper for the lftp and supports FTP, FTPS and SFTP.