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
- Host: GitHub
- URL: https://github.com/tchapi/node-simple-ssh-tunnel
- Owner: tchapi
- License: mit
- Created: 2017-11-03T16:50:09.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-08T16:39:52.000Z (about 8 years ago)
- Last Synced: 2025-03-28T06:27:39.838Z (10 months ago)
- Topics: nodejs, ssh, ssh-tunnel
- Language: JavaScript
- Homepage: https://www.foobarflies.io/tunnel-all-the-things/
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 ...")
})