1.0.4 • Published 2 years ago
n-sftp v1.0.4
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:portupload file
n-sftp u localFilename remoteFilenamedownload file
n-sftp d remoteFilename localFilenameUsage 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')