for your eyes only
Knowledge Hurts – a blog of thoughts, things and stuff.

Port forwarding beauty

If you are user who has significant Linux skills and wants to access your computer behind the college’s NAT with SSH from all around the world, you might try these instructions.On your local machine (behind the NAT), run (where 1024 > port > 65536, preferably something pretty random): ssh -R port:localhost:22 user@minerva

Then, log in to minerva and leave the connection there. You might want to run this in screen or set your terminal not to send the hup signal or whatever. If you’re worried about the connection terminating, you can fix this with a while loop plus ssh-agent OR configure your ssh_config to set TCPKeepAlive to yes.

When you want to connect to your machine from somewhere external, ssh to minerva and run (where localuser is the user on your machine, not minerva): ssh -p port localuser@localhost

And then you’ll be sshed to your machine.

Source: http://ca.simons-rock.edu/ca/wiki/RemoteSSH?version=2

If you are user who has significant Linux skills and wants to access a computer behind the college’s NAT with SSH from a remote host, you might try these instructions.On your local machine (behind the NAT), run (where 1024 > port > 65536, preferably something pretty random): ssh -R port:localhost:22 user@minerva

Then, log in to minerva and leave the connection there. You might want to run this in screen or set your terminal not to send the hup signal or whatever. If you’re worried about the connection terminating, you can fix this with a while loop plus ssh-agent. OR configure your ssh_config to set TCPKeepAlive to yes.

When you want to connect to your machine from somewhere external, ssh to minerva and run (where localuser is the user on your machine, not minerva): ssh -p port localuser@localhost

And then you’ll be sshed to your machine.

http://ca.simons-rock.edu/ca/wiki/RemoteSSH?version=2

No Responses Yet to “Port forwarding beauty”

Leave a Reply