Skip to content

ftp.Connect

Creates an FTPClient instance that can be used to interact with an ftp server.

js
let client = ftp.Connect(protocol, host, port, username, password);
let client = ftp.Connect(protocol, host, port, username, password);

Parameters

  • protocol - The ftp protocol for this connecton. At the moment, only sftp is supported.
  • host - The ftp host like a domain name or an ip address
  • port - The port to use on the ftp connection
  • username - The username to use
  • password - The password for the user

Example

js
let client = ftp.Connect(
    "sftp",
    "example.domain.com",
    22,
    "brad",
    "password"
);
let client = ftp.Connect(
    "sftp",
    "example.domain.com",
    22,
    "brad",
    "password"
);