-
Notifications
You must be signed in to change notification settings - Fork 12
Description
I keep getting "ssh_exchange_identification: Connection closed by remote host" when trying to connect to the device. I get verification the tunnel has been created but I cannot seem to login. Here is the code on the node I want to connect too:
`var tunnel = require('reverse-tunnel-ssh');
// This is a very handy way to test your next webhook !
// Please set up your /etc/hosts or change the hostname befor
// running the example.
var config = {
host: 'xx.xx.xx.x',
username: 'root',
password: 'some_pass',
dstHost: '0.0.0.0', // bind to all interfaces (see hint in the readme)
dstPort: 1987,
//srcHost: '127.0.0.1', // default
//srcPort: dstPort // default is the same as dstPort
}
tunnel(config, function(error, clientConnection) {
console.log(clientConnection._forwarding);
});
require('http').createServer(function(res, res){
res.end('SSH-TUNNEL: Gate to heaven !');
}).listen(config.dstPort);
console.log('Tunnel created: http://'+config.host+':'+config.dstPort);`