Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simple-ssh

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-ssh - npm Package Compare versions

Comparing version 0.8.7 to 0.8.8

test.js

3

lib/ssh.js

@@ -123,2 +123,3 @@ 'use strict';

});
if (command.in) stream.end(command.in);
});

@@ -142,2 +143,3 @@ };

start: function(){},
in: null,
out: function(){},

@@ -156,2 +158,3 @@ err: function(){},

cmd: command,
in: options.in,
handlers: {

@@ -158,0 +161,0 @@ start: options.start,

2

package.json
{
"name": "simple-ssh",
"version": "0.8.7",
"version": "0.8.8",
"description": "A wrapper for ssh2 to make it easier to perform commands over SSH",

@@ -5,0 +5,0 @@ "keywords": [

@@ -72,2 +72,10 @@ # simple-ssh

* Sending data to stdin:
```javascript
ssh.exec('cat > /path/to/remote/file', {
in: fs.readFileSync('/path/to/local/file')
}).start();
```
* Chaining commands together:

@@ -180,2 +188,3 @@

* **options.args** { _String[]_ }: Additional command line arguments (default: `null`)
* **options.in** { _String_ }: Input to be sent to `stdin`
* **options.out** { _Function( stdout )_ }: `stdout` handler

@@ -182,0 +191,0 @@ * **stdout** { _String_ }: Output streamed through `stdout`

@@ -103,2 +103,13 @@ 'use strict';

});
it('should provide data on stdin', function(done) {
var input = 'The quick brown fox\njumps over the lazy dog.\n';
ssh.exec('cat', {
in: input,
out: function(stdout) {
expect(stdout).to.be(input);
done();
}
}).start();
});

@@ -105,0 +116,0 @@ it('should handle multiple commands', function(done) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc