[ubuntu-uk] SSH through FIrewall

Seif Attar iam at seifattar.net
Sun May 11 14:06:25 BST 2008


On Sat, 2008-05-10 at 11:13 +0100, Rob Beard wrote: 
> Iain Lane wrote:
> > Adam Bagnall wrote:
> >> On Sat, 2008-05-10 at 09:37 +0100, Seif Attar wrote:
> >>> Hello,
> >>> ...
> >>> Is there a  way to gain access to that  machine through the firewall? is
> >>> there something she can do on her machine (like connect to my machine
> >>> via SSH and forword port 999 on my local machine to port 22 on her
> >>> machine) and then i can connect to my local machine:999 and gain access
> >>> to her machine, is such a thing possible? if yes, how do I go about it?
> >>> ...
> >> I think you can solve this problem using a reverse ssh tunnel. There's
> >> quite a bit of info on google. Someone else might know more but I've
> >> never tried it.
> > 
> > This should work. It will be even more robust if you use autossh to
> > automatically reconnect should either end go down. The command you want
> > to run on her machine is something like:
> > 
> >   screen autossh -R9999:localhost:22 mum at your.machine
> > 
> > Then SSH to 9999 on your machine to get to hers. Another option to
> > consider is a VPN, but this may be overkill for your situation.
> > 
> > Hope to help,
> > Iain
> > 
> 
> Presumably this could be run at bootup from rc.local?
> 
> Rob

Thanks for all the replies I will try this out when she gets the
time! :) to use hamachi i will need to set up some dynamic dns service,
with SSH i can just connect to localhost. 

I am not sure what that command does, I will have to do some reading on
how screen works, but I tried it on a machine in my network, and the
result a normal ssh session into the remote machine. In case there is
something wrong, I will look into how to setup a reverse ssh tunnel, and
then try to figure it out, thanks for the help.

Peace,
Seif A.




More information about the ubuntu-uk mailing list