Skip to content

Instantly share code, notes, and snippets.

@ahultgren
ahultgren / hopping.js
Last active August 29, 2015 13:59
node ssh2 connection hopping attempt
var Connection = require('ssh2'),
net = require('net');
var conn1 = new Connectiweon(),
conn2 = new Connection();
conn1.on('ready', function() {
console.log('FIRST :: connection ready');
conn1.exec('nc github.com 22', function(err, stream) {
if (err) return console.log('FIRST :: exec error: ' + err);