Socket
Socket
Sign inDemoInstall

node-ssh

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-ssh - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

package.json
{
"name": "node-ssh",
"version": "2.0.0",
"version": "2.0.1",
"description": "SS2 with Promises",

@@ -5,0 +5,0 @@ "main": "Dist/SSH.js",

@@ -25,2 +25,16 @@ // @Compiler-Transpile "true"

return new Promise((resolve, reject) => {
if (typeof config.username !== 'string') {
throw new Error('No username provided')
} else if (typeof config.host !== 'string') {
throw new Error('No host provided')
}
if (config.privateKey) {
if (Path.isAbsolute(config.privateKey)) {
try {
config.privateKey = FS.readFileSync(config.privateKey)
} catch (err) {
throw new Error('Unable to read private key')
}
}
}
this.connection.on('error', reject)

@@ -27,0 +41,0 @@ this.connection.on('ready', () => {

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