Skip to content

Cannot connect #7

@brolly759

Description

@brolly759

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);`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions