{"name":"ssh-exec","version":"0.1.4","description":"Execute a script over ssh using Node.JS","repository":{"type":"git","url":"git://github.com/mafintosh/ssh-exec.git"},"dependencies":{"ssh2":"~0.2.14","stream-wrapper":"~0.1.2","once":"~1.3.0","concat-stream":"~1.2.0"},"bugs":{"url":"https://github.com/mafintosh/ssh-exec/issues"},"homepage":"https://github.com/mafintosh/ssh-exec","_id":"ssh-exec@0.1.4","dist":{"shasum":"98586f032dc8045c5ee747b3a963b094409ce4ab","tarball":"http://registry-npm.ywwl.com/ssh-exec/download/ssh-exec-0.1.4.tgz","integrity":"sha512-7rEa542iW+tvXpuLLTcZ5j8YlNyn9SV/rHtt/mxxAiyY9PhiQr+/BPiE6HPbmnaZ1y0E0l75NDG+UlC0ZclmZw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG37rwGXpSkIw4jtJEvZHh68Ow4+V++JOx7XsAirkUkDAiEAlvWjwYFFiLhvVxEpzakIZ7ixQOL4VkwaAxBcDGBj7+0="}],"size":1551,"noattachment":false,"key":"/ssh-exec/-/ssh-exec-0.1.4.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"directories":{},"readme":"# ssh-exec\n\nExecute a script over ssh using Node.JS and pipe to and from it\n\nIt is available through npm\n\n```\nnpm install ssh-exec\n```\n\nIt is written in plain Javascript and uses [ssh2](https://github.com/mscdex/ssh2) for all the heavy lifting.\n\n## Usage\n\n``` js\nvar exec = require('ssh-exec')\n\n// using ~/.ssh/id_rsa as the private key\n\nexec('ls -lh', 'ubuntu@my-remote.com').pipe(process.stdout)\n\n// or using the more settings\n\nexec('ls -lh', {\n  user: 'ubuntu',\n  host: 'my-remote.com',\n  key: myKeyFileOrBuffer,\n  password: 'my-user-password'\n}).pipe(process.stdout)\n\n// or if you want to pipe some data to the remote process\n\nprocess.stdin\n  .pipe(exec('echo try typing something; cat -', 'ubuntu@my-remote.com'))\n  .pipe(process.stdout)\n```\n\nOptionally there is a callback api as well\n\n``` js\nexec('ls -lh', 'ubuntu@my-remote.com', function (err, stdout, stderr) {\n  console.log(err, stdout, stderr)\n})\n```\n\n## License\n\nMIT\n","publish_time":1385408364185,"_cnpm_publish_time":1385408364185,"dist-tags":{"latest":"2.0.0"}}