From: David Relson <relson@osagesoftware.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] SSH question
Date: Mon, 20 Aug 2012 07:35:06 -0400 [thread overview]
Message-ID: <20120820073506.5fc30bc3@osage> (raw)
In-Reply-To: <201208200650.58012.michaelkintzios@gmail.com>
On Mon, 20 Aug 2012 06:50:29 +0100
Mick wrote:
> On Monday 20 Aug 2012 04:48:40 Canek Peláez Valdés wrote:
> > On Sun, Aug 19, 2012 at 10:31 PM, David Relson
> > <relson@osagesoftware.com>
> wrote:
> > > G'day,
> > >
> > > 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.
> > >
> > > The configuration options include:
> > > Seconds between keepalives -- 120
> > > Don't start a shell or command
> > >
> > > Forwarded port:
> > > source port number - PORT
> > > Destionation: MACHINE.DOMAIN.COM
> > >
> > > Host - IP_Address
> > > Login - userid
> > > Password - pw
> > >
> > > Using "ssh -N userid@IP_Address" gives me a password prompt and no
> > > command prompt - both good.
> > >
> > > How do I specify the forwarded port?
> >
> > If I understand correctly, with -L:
> >
> > ssh -L XX:machine2:YY user@machine1
> >
> > 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.
>
> 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.
>
> 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:
>
> ssh -N -D XXXX user@machine1
>
> For applications that do not have built in proxy capability you can
> use e.g. proxychains.
>
> HTH.
> --
> 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:
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
next prev parent reply other threads:[~2012-08-20 11:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-20 3:31 [gentoo-user] SSH question David Relson
2012-08-20 3:48 ` Canek Peláez Valdés
2012-08-20 5:50 ` Mick
2012-08-20 11:35 ` David Relson [this message]
2012-08-20 18:04 ` Mick
2012-08-23 0:02 ` David Relson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120820073506.5fc30bc3@osage \
--to=relson@osagesoftware.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox