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
> > <rel...@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

Reply via email to