1.0.5 • Published 3 years ago

sftp-connection v1.0.5

Weekly downloads
13
License
MIT
Repository
github
Last release
3 years ago

sftp-connection

npm npm NPM

Installation

npm i -D sftp-connection

Usage

  1. upload files to remote server
const SftpConnection = require('sftp-connection');
const { readFileSync } = require('fs');
const sftp = new SftpConnection({
    host: '127.0.0.1',
    port: 22,
    username: 'root',
    password: 'password' // or privateKey: readFileSync('/xx/xxx/.ssh/id_rsa')
});

sftp.upload({
    localPathPrefix: '/root/project/',
    localPath: '/root/project/**/*', // glob rules
    remotePath: '/usr/nginx/html/project/
});
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago