[Durham] ssh and reverse port thingummy bob
Richard at helpquick.co.uk
Mon Dec 24 10:53:01 UTC 2012
What dougie wants to be able to do is ssh from home to work without having port forwarding setup at work.
Such that from a linux machine at work, he would run:
ssh -R 2112:localhost:22 dougie at home_ip_address
This establishes an ssh session with port 2112 on his home server forwarded to port 22 on the work machine.
He can then go home, issue ssh -p 2112 dougien at localhost, which will be forwarded through to his work machine.
I've just seen Martin's reply saying the same thing...
Oh well, he can type faster than me I guess ;-)
From: durham-bounces at mailman.lug.org.uk [mailto:durham-bounces at mailman.lug.org.uk] On Behalf Of Richard Mortimer
Sent: 24 December 2012 10:36
To: Durham Linux User Group mailing list
Subject: Re: [Durham] ssh and reverse port thingummy bob
The -L option takes two port numbers. try using -L 2112:localhost:22
Dougie Nisbet <dougie at highmoor.co.uk> wrote:
>this is really for Riccard but someone else might know.
>I'm trying to use ssh to login to machine2 from my home PC. Riccard
>gave me the commands and it looks promising but not quite there.
>On machine2 I type:
> ssh -R 2112:127.0.0.1:22 dougie at dougie_home
>and I get in no problems.
>At home I type:
>ssh -L 2112:localhost dougien at localhost
>(and many variations of this using various flags from man page)
>but I usually get something along the lines of:
>Bad local forwarding specification '2112:localhost'
>I can't really make head-nor-tail of the man page.
>Durham mailing list - Durham at mailman.lug.org.uk
Durham mailing list - Durham at mailman.lug.org.uk
More information about the Durham