Can't connect FTP on port 22


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

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

let sftp = new Client();


  host: "",

    user: "epiz_25107181",

    password: "xxxxxxxxx",


}).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 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.


Thanks a lot !!

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