Thursday, 2 August 2018

I have some issue when do SSH tunnel.

I have this code ```javascript const tunnel = require('tunnel-ssh'); const dev = process.env.NODE_ENV !== 'production';var config = { username:'root', host:'180.169.151.114', agent : process.env.SSH_AUTH_SOCK, port:22, dstPort:27017, password:'root32312' };var server = tunnel(config, function (error, server) { if(error){ console.log("SSH connection error: " + error); }else{ console.log('Connect ok') } }); ```At host: i type wrong IP server, can't connect this --> console show Connect OK At password: i type wrong password. --> console show connect ok When i type all true ==> console show connect okShow please help me know what im wrong with this code. Thanks for any help

Submitted August 03, 2018 at 07:50AM by jackie619

No comments:

Post a Comment