Edit

Description

![alt text](https://i.stack.imgur.com/4iK3b.png "Reverse SSH Tunnel") # Pattern ``` ssh -R *:NEW_PORT:localhost:TARGET_PORT MIDDLE_HOST -p MIDDLE_PORT -l USER ``` # For long term (crontab) ``` @reboot /usr/bin/autossh -M 0 USER@MIDDLE_HOST -p MIDDLE_PORT -N -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -R BINDING_ADDRESS:NEW_PORT:localhost:TARGET_PORT ``` --------------------- Ref1: [Stack Exchange: How does reverse ssh tunneling work](https://unix.stackexchange.com/questions/46235/how-does-reverse-ssh-tunneling-work) Ref2: [Server fault: SSH Reverse port forward bind to address](https://serverfault.com/questions/526782/ssh-reverse-port-forward-bind-to-address)

Option

Reverse SSH Tunnel

Script