Is there a self-contained alternative to
ssh -R [bind_address:]port:host:hostport functionality?
Basically, I have a machine that doesn't have a public IP address. I need to be able to SSH into said machine.
The easiest way to accomplish this would be through a reverse SSH connection — by doing
ssh -R "8022:[::1]:22" guest@host in a loop on the machine without a public IP address; which would subsequently make it possible to ssh into said machine by using
ssh root@host -p8022 from anywhere on the internet.
However, this setup requires adding a new user on
host, which, if not done correctly, may involve a potential compromise or open a vulnerability, especially if you don't necessarily trust the machine that doesn't have a public IP. Additionally, it may also require administrator privileges on the machine with a public IP, as the
sshd might be configured with the
AllowTcpForwarding=no, as per