atinux / node-ftps

FTP, FTPS and SFTP client for node.js, mainly a lftp wrapper.
MIT License
202 stars 57 forks source link

Connecting to ftp using FTPS #71

Open saju-samuel opened 5 years ago

saju-samuel commented 5 years ago

const FTPS = require('ftps');

var ftps = new FTPS({ host: 'xx.xx.xxx.xx', username: 'xxx', password: 'xxxxxx', protocol: 'ftps', port: 990, additionalLftpCommands: [ 'set ssl-allow true', 'set ssl:verify-certificate no', 'set passive-mode yes' ].join(';'), }); ftps.ls().exec(console.log);

I just tried with this code and it gave me the following error :

ls: Fatal error: SSL_connect: unknown protocol\n

Don't we need to set the requreSSH to true and sshKeyPath property also. Please advice.