0.0.3 • Published 9 years ago

ssh-kit v0.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

ssh-kit

Build Status

minimalist, efficient ssh client for javascript

var SSH = require('ssh-kit'),
    ssh = new SSH();

ssh.set('username', 'dmitriiabramov');
ssh.set('host', 'rheia.us');
ssh.set('sshKey', '~/.ssh/id_rsa');

ssh.exec('pwd');
ssh.exec('ls -la');
ssh.exec('ls');
ssh.on('finish', console.log.bind(console, 'all done!'));
// TODO:

// multiple servers in parallel
ssh.addServer('s1');
ssh.addServer('s2');

// ssh options
ssh.set('forward-agent', true);

// additional parameters
ssh.with({dir: '~/test', env: {ENV: 'test'}, servers: ['s1', 's2'], function() {
    ssh.exec('forever start ./run.js');
});

// utils

ssh.mkdirIfNotExists('~/test1'); // etc...


// Testing
create temporary `authorized_keys` file and restore original in after hook
0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

0.0.0

10 years ago