node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



Skyrun is a small utility library to assist running local scripts on remote servers. With Skyrun you can log into a remote server and run a script of any kind (such as bash, node, python etc. Just provide the appropriate hash bang).

Installing Skyrun

To use skyrun from the cli, install skyrun globally

npm install -g skyrun

Using Skyrun from the CLI


skyrun user@host path/to/

Using Skyrun Programmically

At the moment Skyrun only supports logging into remote hosts via ssh public key authentication. Password authentication via ssh is not supported.

var skyrun = require('skyrun');
var options = {
    'host':'remote server',
    'user':'user to log in with' // optional. Defaults to current user 
    'identity':'private key', // optional 
var server = skyrun.createServer(options);'local/path/to/', function(err, stderr, stdout) {
    if (err) {
        if (typeof(err['code']) !== 'undefined' && err['code'] === 1) {
            // There was an error running the script 
        } else {
            // There was an attempting to run the script. Possibly a network or authentication problem. 
    else {
        // No error. have a look in stdout to see the output of the script