An open API service indexing awesome lists of open source software.

https://github.com/tchapi/node-simple-ssh-tunnel

A simple wrapper for SSH tunnelling
https://github.com/tchapi/node-simple-ssh-tunnel

nodejs ssh ssh-tunnel

Last synced: 7 months ago
JSON representation

A simple wrapper for SSH tunnelling

Awesome Lists containing this project

README

          

Simple SSH tunnel for Node
---

> This script has no dependency on other Node modules.

See the article at https://www.foobarflies.io/tunnel-all-the-things/

#### Usage :

const tunnel = require('ssh_tunnel')

tunnel.setConfig({
user: "tunnel_user",
server: "central.example.org",
port: 22,
timeout: 10000, // in milliseconds
verbose: true // will output logs to the console if true
})

tunnel.start(function() {
console.log(tunnel.getState())

// Later ...
tunnel.stop()
}, function() {
console.log("There has been an error ...")
})