4 ms·
Basically: autossh -M 20000 -N -R host:8080:localhost:80 user@host -M sets the control port for autossh which it uses to check if all is working right. The res
by zilti 3y ago
Basically: autossh -M 20000 -N -R host:8080:localhost:80 user@host
-M sets the control port for autossh which it uses to check if all is working right. The rest is standard SSH syntax; in this example, a loopback socket on port 8080 on host will get opened, and all requests to it are forwarded to localhost's port 80.
If you want it to be a "real" socket instead of just loopback, set "GatewayPorts clientspecified" in sshd_config.
- deleted 3y ago[deleted]
- aussieguy1234 3y agois the `host` part here a server that you run yourself?
- em-bee 3y agoyes
- aussieguy1234 3y agoThe main purpose of services like Tunnelmole and ngrok is to basically provide this functionality and save you from having to run your own server. Its easy for people like us, I've used SSH for more than 20 years. Alot of devs however don't have good Linux/infra/ssh exposure. Others might have that exposure, but don't have the spare time or energy to run their own server.