Adit
Forward all your stuff through ssh tunnel.
There is a lot of examples out there how this could be useful, for example, check out "SSH Tunnel - Local and Remote Port Forwarding Explained With Examples"
Usage
Adit
ssh and $ ssh -L 9000:imgur.com:80 example.com
'9000:imgur.com:80 example.com'/*, password*/;
$ ssh -R 9000:localhost:3000 example.com
'9000:localhost:3000 example.com'/*, password*/;
Listen for events
let server = ...;server;serverserver;server; server;
Thorough
; let adit = host: `example.com` // Everything else is optional // username: 'tester' // By default, `USER` environment variable will be used // port: 22, // 22 By default // Or port range - // port: [22, 23], the first available port of the three will be used // Also, see "Authentification strategy" below - // "agent": "path", // "password": "pass", // "key": Buffer; // Or justlet adit = 'example.com'; // `3` - is how many times we want to try to connect, before bailing out */adit; adit; // Then, after awhile you would want to close itadit;
Authentification strategy
- If
password
is defined - use it - If
agent
orkey
is defined explicitly - use one of them, prioritize theagent
- If
agent
orkey
is not passed - use environment varibles (SSH_AUTH_SOCK
foragent
)
Note: if key
is used, assume it is added without passphrase, otherwise you should use agent