Assume we have an intermediate server with static ip or domain.
On the destination computer:
ssh -N -R 9876:localhost:22 firstname.lastname@example.org
This will establish a connection between the destination computer and the intermediate server, and forward all traffic from port 9877 on the server to port 22 (the default port for ssh connection) on the destination computer.
Also we have to add
GatewayPorts yes to the
/etc/ssh/sshd_config) on the intermediate server and restart
the ssh service.
sudo service ssh restart
Then we can connect to the destination computer with:
ssh email@example.com -p 9876
For SERVEO, use:
ssh -R myalias:22:localhost:22 serveo.net
ssh -J serveo.net user@myalias
© 2019 Notes on Learning Flight