samueleaton / autossh

Persistent SSH tunnels
https://www.npmjs.com/package/autossh
59 stars 16 forks source link

RemoteHost #11

Open corrpel opened 6 years ago

corrpel commented 6 years ago

Hi! How can i add the remoteHost, in order to be able to accept connections from something different than localhost? Like: ssh -NR 0.0.0.0:6667:192.168.1.64:80.................. Thank you!

samueleaton commented 6 years ago

You mean like in this example? https://github.com/samueleaton/autossh#tunneling-ports-from-another-host

See this function for how the ssh string is generated: https://github.com/samueleaton/autossh/blob/master/src/index.js#L255

If you want to use the -R option instead of -L, you would set reverse: true in the configuration object.