Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcollina/remote-forwarder
Forward a local port to a remote server in node, using SSH client
https://github.com/mcollina/remote-forwarder
Last synced: 12 days ago
JSON representation
Forward a local port to a remote server in node, using SSH client
- Host: GitHub
- URL: https://github.com/mcollina/remote-forwarder
- Owner: mcollina
- License: mit
- Created: 2014-12-01T14:57:46.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-15T11:45:59.000Z (over 9 years ago)
- Last Synced: 2024-12-25T10:21:31.465Z (15 days ago)
- Language: JavaScript
- Homepage:
- Size: 277 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
remote-forwarder
================Forward a local port to a remote server, using SSH.
It wraps `ssh -R` so that in can be used in node-land.Install
-------```bash
npm install remote-forwarder --save
```Usage
-----`remote-forwarder` inherits from [Recovery](http://npm.im/recovery), so
it can keep the forwarding up even if it dies.```js
var forwarder = require('remote-forwarder')var forward = forwarder({
target: target // the target host
, identityFile: identity // the SSH identity file, optional
, user: user // the user in the target system
, port: port // the local port to expose remotely
, retries: 100 // the number of retries
// plus all other Recovery options
})forward.on('connect', function() {
// this will be called any time a
// new connection is established// do stuff here ...
forward.stop() // to stop forwarding
})forward.start()
```Acknowledgements
----------------This project was kindly sponsored by [nearForm](http://nearform.com).
License
-------MIT