node-ftp icon indicating copy to clipboard operation
node-ftp copied to clipboard

Ready And Greeting Event not triggered while connecting

Open adishupadhyay opened this issue 5 years ago • 0 comments

Hi All,

While connecting to FTP server ready and greeting event did not trigger. after few second end and close event is called below is my code var mime = require('mime-types') var Client = require('ftp'); var fs = require('fs') var ftpClient = new Client(); ftpClient.on('greeting', function (msg) { console.log("FTP connected*") }); ftpClient.on('ready', function () { console.log("FTP connected*") }); ftpClient.on('close', function (hadErr) {

console.log("******FTP Connection has been closed", hadErr)

});

ftpClient.on('error', function (error) { console.log("****************Error in connecting to FTP", error)

}); ftpClient.on('end', function () { console.log("****************Connection has been ended")

}); ftpClient.connect({ "host": 'hostname', "port": 22, "user": "user", "password": "password", "keepalive": 500, // "pasvTimeout": 50000, "connTimeout": 5500000 }); Plz help

adishupadhyay avatar Oct 07 '20 08:10 adishupadhyay