From owner-freebsd-questions@FreeBSD.ORG Sun May 9 08:16:02 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A398916A4CE for ; Sun, 9 May 2004 08:16:02 -0700 (PDT) Received: from auk2.snu.ac.kr (auk2.snu.ac.kr [147.46.100.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24AFB43D1D for ; Sun, 9 May 2004 08:16:02 -0700 (PDT) (envelope-from stopspam@users.sourceforge.net) Received: from [147.46.44.181] (stopspam@users.sourceforge.net) by auk2.snu.ac.kr (Terrace Internet Messaging Server) with ESMTP id 2004051000:02:42:903221.28674.2621647792 for ; Mon, 10 May 2004 00:02:42 +0900 (KST) Message-ID: <409E4B31.7020100@users.sourceforge.net> Date: Mon, 10 May 2004 00:16:01 +0900 From: Rob User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040507 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pwd8jmr22w@me.point.ne.jp, freebsd-questions@freebsd.org References: <200405061032.19742.pwd8jmr22w@me.point.ne.jp> In-Reply-To: <200405061032.19742.pwd8jmr22w@me.point.ne.jp> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-TERRACE-SPAMMARK: NO (SR:8.14) (by Terrace) Subject: Re: Need Advice in SSH X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2004 15:16:02 -0000 Bull TORS wrote: > Hello, > > I was hoping if anyway could give me advice, hints, and anything about this > question of mine. > > > laptop1.mydomain.org <-----?ssh?---> laptop2.mydomain.org > Static IP Address from the DHCP client of my ISP > Company LAN Server with > a different domain (companydomain.org) > You've triggered my curiosity and I've tried a bit myself with ssh. I've come a little further. Imagine this network setup: PC1 ------ Gateway -----//-----PC2 PC1: 10.0.0.N on a local network PC2: has world-wide IP address, say: x.y.z Then you can do on PC1: ssh -N -f -R 2200:localhost:22 x.y.z which will create an ssh-tunnel from PC1 to PC2 as a background process, and will force PC2 to listen on port 2200, which will be connected to port 22 on PC1. After establishing this tunnel, you can do on PC2: ssh -p 2200 localhost and you connect directly to PC1. In this process, you do not need any login/password on the gateway!! Exchanging public keys of the two PCs, will skip the password checking. You also can add lines in ~/.ssh/config, to shorten the last command. I know in your case, both PCs are on a local network and there are two gateways inbetween. So this is not the final solution to your problem, but it may help you understand what way to go with ssh. I remember you had login/password of one gateway, which certainly may make things easier. I hope all this helps a bit. Rob.