Can't connect FTP on port 22

Hello

Can’t connect to my sftp on port 22 with node :slight_smile:

let Client = require('ssh2-sftp-client');

let sftp = new Client();

sftp.connect({

  host: "ftpupload.net",

    user: "epiz_25107181",

    password: "xxxxxxxxx",

    port:22

}).then(() => {

  return sftp.list('/pathname');

}).then(data => {

  console.log(data, 'the data info');

}).catch(err => {

  console.log(err, 'catch error');

});

{ Error: connect: client-socket error. Remote host at 185.27.134.11 refused connection after 2 attempts

Any idea ?

Hello there,

InfinityFree does not support SFTP protocol nor is it available in free hosting.
You must use the plain FTP protocol on port 21.

Also is this piece of code related to SSH?

If so, then SSH is not supported and is not available on free hosting as well.

3 Likes

Thanks a lot !!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.