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

ssh-tun

Package Overview
Dependencies
Maintainers
5
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssh-tun - npm Package Compare versions

Comparing version 1.5.0 to 1.6.0

8

index.js

@@ -26,2 +26,4 @@ 'use strict';

* @param {number} [opts.connectTimeout=10000] ssh connect timeout
* @param {boolean} [opts.strictHostKeyChecking=true] verify host authenticity
* @param {string} [opts.identity] private key for public key authentication
*/

@@ -42,2 +44,4 @@ __constructor: function (opts) {

this._closeDeferred = q.defer();
this._strictHostKeyChecking = opts.strictHostKeyChecking === undefined ? true : opts.strictHostKeyChecking;
this._identity = opts.identity;
},

@@ -129,5 +133,7 @@

'-v',
this._strictHostKeyChecking === false ? '-o StrictHostKeyChecking=no' : '',
this._identity ? util.format('-i %s', this._identity) : '',
util.format('-p %d', this._sshPort),
(this.user ? this.user + '@' : '') + this.host
];
].filter(Boolean);
},

@@ -134,0 +140,0 @@

2

package.json
{
"name": "ssh-tun",
"version": "1.5.0",
"version": "1.6.0",
"description": "Module for establishing ssh tunnel",

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

@@ -121,2 +121,26 @@ var Tunnel = require('../'),

it('should spawn tunnel with StrictHostKeyChecking=no if host verification is disabled', function () {
tunnel = createTunnel({
strictHostKeyChecking: false
});
tunnel.open();
var sshArgs = childProcess.spawn.lastCall.args[1];
expect(sshArgs).to.contain('-o StrictHostKeyChecking=no');
});
it('should spawn tunnel with provided identity file disabled', function () {
tunnel = createTunnel({
identity: '~/.ssh/id_rsa_alt'
});
tunnel.open();
var sshArgs = childProcess.spawn.lastCall.args[1];
expect(sshArgs).to.contain('-i ~/.ssh/id_rsa_alt');
});
it('should resolve promise if tunnel successfully created', function () {

@@ -123,0 +147,0 @@ tunnel = createTunnel();

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