Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Aug 2010 01:45:02 -0400
From:      David Banning <david@skytracker.ca>
To:        Steven Susbauer <steven@too1337.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: forwarding ssh
Message-ID:  <4C5E445E.3090101@skytracker.ca>
In-Reply-To: <4C5DF9EC.8010101@too1337.com>
References:  <8cb14ab2da609fa44d278cee5ce5c737.squirrel@sq.3s1.com> <4C5DF9EC.8010101@too1337.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  Thanks for that Steven. Connecting this way is only a deviation from 
the usually connection  we use.  I have several users you have X-win32 
configured on their laptops on the road.  I was hoping to make this 
change invisible to each existing user and their setup since we will be 
going back to the previous direct X-Win32 ssh connection soon.  I'll 
look at the -R option that you mentioned which I was not aware of.

On 8/7/2010 8:27 PM, Steven Susbauer wrote:
> On 08/07/10 16:23, David Banning wrote:
>> I presently am using Putty and X-Win32 and I am connecting to a remote
>> machine successfully.
>>
>> I now need to connect using SSH over the internet -through- one machine,
>> but have my SSH with a second machine on the same site - something like
>> so;
>>
>> ssh-site1 --(internet)--->  site2-(also 192.168.1.1)-->  
>> loc2-(192.168.1.50)
>>
>> I need to bridge the connection from 192.168.1.1 to 192.168.1.50
>> so I've tried in ipnat;
>>
>
> If I hear you right, you're trying to connect to site2 over the 
> internet, and also connect to loc2 through the connection on site2.
>
> SSH can create a tunnel itself. You could use something like:
>    'ssh -L 2200:loc2:22 user@site2'
>
> This would connect you to a shell on site2. Then on your machine open 
> another terminal and type:
> 'ssh -p 2200 user@localhost' which would connect to loc2 port 22 using 
> the connection on site2. If you try to close the connection to site2, 
> it won't work since you're still connected to loc2.
>
> ssh also supports forwarding a port on the remote server using -R, but 
> I'm led to believe you are trying to limit the connections that get 
> through the site2 to loc2 and -L requires you (or someone else) to be 
> on local system.
>
> In putty this same feature is configured under Connection > SSH > 
> Tunnels.
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C5E445E.3090101>