n-sftp
v1.0.4
Published
[![npm][npm-image]][npm-url] [![MIT License][mit-license-image]][mit-license-url]
Downloads
4
Readme
n-sftp
About
node version sftp cli tool, can upload or download file from the sftp server.
Installation
npm install -g n-sftp
Usage as cli
setting
n-sftp user:password ip:port
upload file
n-sftp u localFilename remoteFilename
download file
n-sftp d remoteFilename localFilename
Usage as a module
import {SftpClient} from 'n-sftp'
const config = {
host: '10.11.12.13',
port: 22,
username: 'username',
password: 'password',
}
const sftp = new SftpClient(config)
sftp.uploadFile('localfile.txt', 'remotefile.txt')