How to use the tunnel-ssh.tunnel function in tunnel-ssh

To help you get started, we’ve selected a few tunnel-ssh examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github garrylachman / ElectroCRUD / old / app / scripts / services / mysql.js View on Github external
return new Promise(function(resolve, reject) {
          var tunnelPort = Math.round(Math.random()*10000);
          var config = {
            host: ssh_host,
            srcPort: tunnelPort,
            dstPort: ssh_port,
            username: ssh_username,
            password: ssh_password
          };
          var server = tunnel(config)
            .then(function (result) {
              resolve(_this.getDirectConnection(mysql_host, tunnelPort, mysql_user, mysql_password, mysql_database));
            })
            .catch(function (err) {
              reject(err);
            })
        });
      },

tunnel-ssh

Easy extendable SSH tunnel

MIT
Latest version published 10 months ago

Package Health Score

66 / 100
Full package analysis

Popular tunnel-ssh functions