From owner-freebsd-questions@FreeBSD.ORG Sun Aug 8 00:27:28 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBAA1106564A for ; Sun, 8 Aug 2010 00:27:28 +0000 (UTC) (envelope-from steven@too1337.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id AF7898FC15 for ; Sun, 8 Aug 2010 00:27:28 +0000 (UTC) Received: by gxk24 with SMTP id 24so3980588gxk.13 for ; Sat, 07 Aug 2010 17:27:27 -0700 (PDT) Received: by 10.150.134.5 with SMTP id h5mr47042ybd.405.1281227247702; Sat, 07 Aug 2010 17:27:27 -0700 (PDT) Received: from thinkpad.susnet (ip68-99-10-223.om.om.cox.net [68.99.10.223]) by mx.google.com with ESMTPS id q21sm1192497ybk.3.2010.08.07.17.27.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 07 Aug 2010 17:27:27 -0700 (PDT) Message-ID: <4C5DF9EC.8010101@too1337.com> Date: Sat, 07 Aug 2010 19:27:24 -0500 From: Steven Susbauer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.11) Gecko/20100804 Thunderbird/3.0.6 MIME-Version: 1.0 To: David Banning References: <8cb14ab2da609fa44d278cee5ce5c737.squirrel@sq.3s1.com> In-Reply-To: <8cb14ab2da609fa44d278cee5ce5c737.squirrel@sq.3s1.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: forwarding ssh X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Aug 2010 00:27:29 -0000 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.