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.7.4 to 0.8.0

38

lib/ssh.js

@@ -68,2 +68,11 @@ 'use strict';

stream.stderr.on('data', function(data) {
data = data.toString();
stderr += data;
command.handlers.err = command.handlers.err || function() {
console.log(data);
};
command.handlers.err(data);
});
stream.on('data', function(data, extended) {

@@ -79,14 +88,4 @@ // This will allow us to send in the password if we're doing something like `sudo`

data = data.toString();
if (extended === 'stderr') {
stderr += data;
command.handlers.err = command.handlers.err || function() {
console.log(data);
};
command.handlers.err(data);
} else {
stdout += data;
command.handlers.out(data);
}
stdout += data;
command.handlers.out(data);
}

@@ -194,3 +193,3 @@ });

});
}else if (self.pass && self.key) {
} else if (self.pass && self.key) {
self._c.connect({

@@ -211,3 +210,3 @@ host: self.host,

cb = cb || function(){};
if (this._c._sock !== undefined) {
if (this._c._sock !== undefined && this._c._state !== 'closed') {
var self = this;

@@ -253,2 +252,13 @@ this._c.on('close', function(err) {

/**
* Removes an event handler from ssh2
* @param {String} event
* @param {Function} callback
* @return {SSH}
*/
SSH.prototype.off = function(event, callback) {
this._c.off(event, callback);
return this;
};
module.exports = SSH;
{
"name": "simple-ssh",
"version": "0.7.4",
"version": "0.8.0",
"description": "A wrapper for ssh2 to make it easier to perform commands over SSH",

@@ -30,4 +30,4 @@ "keywords": [

"xtend": "~2.0.6",
"ssh2": "~0.2.10"
"ssh2": "~0.3.6"
}
}

@@ -171,3 +171,3 @@ # simple-ssh

* **options.pty** { _Boolean_ }: Allocates a pseudo-tty, useful for command which require `sudo` (default: `false`)
* **on**( _event_, _callback_ ): **Add a listener for the specified event** (Courtesy of [@alexandrejablon][3])
* **on**( _event_, _callback_ ): **Add a listener for the specified event** (Courtesy of [@alexjab][3])
* **event** { _String_ }: Event to listen to

@@ -228,2 +228,2 @@ * **callback** { _Function_ }: Executed on the event

[2]: http://nodejs.org
[3]: https://github.com/alexandrejablon
[3]: https://github.com/alexjab
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