Skip to content

tenbits/sshly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSHly

A wrapper over the ssh2 module to make the API a little bit easier.

npm i sshly
import { Ssh } from 'sshly'

const client = new Ssh({
    host: 'IP',
    privateKeyPath: 'my/private/key'
});


// Execute command
let { code, stdout, stderr } = await client.exec('whoami');

// Read file
let content: string = await client.readAsync('/etc/nginx/sites-available/default');

// Write to file
await client.writeAsync('/etc/nginx/sites-available/default', content);

About

Simplified SSH Client for NodeJS with SSH2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published