-
Have a properly configured VPS to accept ssh tunnels:
- Incoming ports opened
- Connection via a
.pemkey - Add this options to your
/etc/ssh/sshd_configClientAliveInterval 15 ClientAliveCountMax 3
-
Have a sudo user.
-
Copy the
open-reverse-tunnel.shto the device where you want to open a reverse tunnel. -
Give permissions as an executable script.
chmod +x open-reverse-tunnel.sh -
Run the script:
./open-reverse-tunnel.sh -k myKey.pem -p 1234 -u remoteuser -h example.comWhere:
- k is the path to the
.pemfile. - p is the VPS port for the reverse tunnel.
- u is the VPS user.
- h is the VPS host.
- k is the path to the