From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EF4AE138010 for ; Mon, 20 Aug 2012 11:37:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 76224E06B0; Mon, 20 Aug 2012 11:37:02 +0000 (UTC) Received: from mail.osagesoftware.com (usr33-138.provide.net [216.86.83.138]) by pigeon.gentoo.org (Postfix) with ESMTP id A8580E05D5 for ; Mon, 20 Aug 2012 11:35:08 +0000 (UTC) Received: from osage (osage.osagesoftware.com [192.168.1.10]) by mail.osagesoftware.com (Postfix) with ESMTP id E74077BC38 for ; Mon, 20 Aug 2012 07:35:06 -0400 (EDT) Date: Mon, 20 Aug 2012 07:35:06 -0400 From: David Relson To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] SSH question Message-ID: <20120820073506.5fc30bc3@osage> In-Reply-To: <201208200650.58012.michaelkintzios@gmail.com> References: <20120819233141.56bfa9b5@osage> <201208200650.58012.michaelkintzios@gmail.com> Organization: Osage Software Systems, Inc. X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 869ee3d7-b4c2-421a-bac2-1318cefbaa17 X-Archives-Hash: fb075769228b6ec00a4186be601c619f On Mon, 20 Aug 2012 06:50:29 +0100 Mick wrote: > On Monday 20 Aug 2012 04:48:40 Canek Pel=C3=A1ez Vald=C3=A9s wrote: > > On Sun, Aug 19, 2012 at 10:31 PM, David Relson > > =20 > wrote: > > > G'day, > > >=20 > > > I've volunteered to do some data entry for my local bike club. > > > This involves a java application (jar file) and a tunnel to a > > > mysql server. I have detailed PuTTY configuration instructions > > > but haven't yet succeeded in converting them to ssh options. > > >=20 > > > The configuration options include: > > > Seconds between keepalives -- 120 > > > Don't start a shell or command > > > =20 > > > Forwarded port: > > > source port number - PORT > > > Destionation: MACHINE.DOMAIN.COM > > > =20 > > > Host - IP_Address > > > Login - userid > > > Password - pw > > >=20 > > > Using "ssh -N userid@IP_Address" gives me a password prompt and no > > > command prompt - both good. > > >=20 > > > How do I specify the forwarded port? > >=20 > > If I understand correctly, with -L: > >=20 > > ssh -L XX:machine2:YY user@machine1 > >=20 > > This command will connect you to the "machine1" host with user > > "user", and any connection to the port XX to the machine you are > > running the ssh command from, will redirect the connection to the > > "machine2" host in the YY port. >=20 > If you want to forward a local port XX to a remote port YY then > Canek's suggestion will do what you want, assuming that the correct > remote application is listening on port YY. >=20 > When you have more than one application this can soon become > tedious. So, if you want to set up the remote machine as a SOCKS > proxy so that any socks-ified applications on the local machine can > connect to the remote SOCKS, then you can use: >=20 > ssh -N -D XXXX user@machine1 >=20 > For applications that do not have built in proxy capability you can > use e.g. proxychains. >=20 > HTH. > --=20 > Regards, > Mick H'lo Mick and Carnek, The mention of XX and YY wasn't transparent, but a bit of experimentation gave a good connection. Using the terms in my original post, I now have the following working command:=20 ssh -2 -N -L PORT:MACHINE.DOMAIN.COM:22 userid@IP_Address Just need to add an appropriate TCPKeepAlive and all will be good. Thank you both for your tips.. Regards, David