I would highly recommend NOT doing it in the config file.  If you do,
you will only be about to run one instance of ssh at a time.  When
you try to run the second instance while the first is running, it will
fail trying to redirect the port again.  It gives some obtuse error
message (that I don't remember) and it took me awhile to figure out
what was going on.

Joel West wrote:
> 
> Actually it is pretty simple to do from the command line:
> 
> ssh -R (port on remote host):(hostname):(port on localhost) e.g.
> 
> ssh -R 99999:localhost:23
> 
> will create a tunnel from port 99999 on the remote machine to port
> 23(telnet) on my machine.
> 
> On Wed, 10 Jan 2001, Rusty Carruth wrote:
> 
> > Asheesh Laroia <[EMAIL PROTECTED]> wrote:
> > > I need to setup an SSH tunnel that listens on a port, that redirects all
> > > data to 192.168.0.2:5901 (decrypted at this point).
> > >
> > > localhost is a Linux-Mandrake server with SSH installed.
> > >
> > > 192.168.0.2 is a Win98 machine.
> > >
> > > I have tried to configure SSH to forward the port, but to no avail.
> > >
> > > What command-line options do I use?
> > >
> > > Thanks in advance.
> >
> > well, its not a command line.  You need to set up your ~/.ssh/config
> > (or perhaps ~/.ssh2/config), and add something like this:
> >
> > host thatHost
> >       LocalForward <theport> anotherhost:<possibly_another_port>
> >
> >
> > for example, to forward nntp from localhost to news.inficad.com when
> > you are ssh'd from localhost to user?.inficad.com, you'd say:
> >
> > host user?.inficad.com
> >        LocalForward 119 news.inficad.com:119
> >
> >
> > I believe this is covered in man ssh?  (brings up window, does
> > man ssh, scrolls down a bit - Oh, look, a command line option!
> > Whaddaya know - one always can learn something new by reading
> > the man page,eh?  ;-)
> >
> > ssh -R port:host:hostport
> >
> > I'll let you go read the man page for details...
> >
> > rc
> >
> >
> > Rusty Carruth          Email:     [EMAIL PROTECTED] or [EMAIL PROTECTED]
> > Voice: (480) 345-3621  SnailMail: Schlumberger ATE
> > FAX:   (480) 345-8793             7855 S. River Parkway, Suite 116
> > Ham: N7IKQ @ 146.82+,pl 162.2     Tempe, AZ 85284-1825
> >

-- 
Tom Schutter (mailto:[EMAIL PROTECTED])
Platte River Associates, Inc. (http://www.platte.com)

Reply via email to