New: Check out our Persistent, Zero-Config Tunnels with WireGuard for a high-performance alternative.
If you're using this to connect to an SSH server, then you can use OpenSSH's JumpHost feature. On the target machine, you might start the tunnel like this:
ssh -R myalias:22:localhost:22 serveo.net
Then you can establish an SSH connection using serveo.net as an intermediary like this:
ssh -J serveo.net user@myalias
The -J option was introduced in the OpenSSH client version 7.3. If you have an older client, you can use the ProxyCommand option instead:
ssh -o ProxyCommand="ssh -W myalias:22 serveo.net" user@myalias