sergi/jsftp — Issue #9: jsftp won't auth
Author: brunoqc
Created: 2011-10-11 17:32:48+00:00
State: open

I have a weird problem today. It seems I can't connect to my ftp. Maybe something broke when I updated my npm modules.

// Initialize some common variables
var user = "user ";
var pass = "pass";

var Ftp = require('jsftp');
var ftp = new Ftp({
host: "127.0.0.1",
port: 21, // The port defaults to 21, but let's include it anyway.
});

// First, we authenticate the user
ftp.auth(user, pass, function(err, res) {
if (err) throw err;
console.log("auth ok");
});