sshly
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

SSHly

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

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);

/sshly/

    Package Sidebar

    Install

    npm i sshly

    Weekly Downloads

    1

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    31.3 kB

    Total Files

    16

    Last publish

    Collaborators

    • tenbits