Port Forwarding via SSH - Was: Re: [H-GEN] Static Routing

Tim Kent tim.kent at wkconsulting.com.au
Thu Apr 29 20:10:15 EDT 2004


David Findlay wrote:

> I've just been fiddling with ssh'ing to a box that sits on a secure LAN and 
> has access to an intranet. Is there a way I could use ssh forwarding to allow 
> me to browse the intranet at that site from my home machine via ssh? I tried 
> the following: ssh -R 80:localhost:8081 root at foo.bar.com but when I 
> authenticated it said unable to listen to port 80. What would I have to do to 
> get this to work? Thanks,

I use this to access an internal-only IRC service with the following
syntax (yes the IRC daemon is on the same box):

$ ssh -L 16667:localhost:6667 procne.wkconsulting.com.au

I can then access the IRC service by connecting to localhost:16667 with 
my IRC client.  The same can be done for your web site.

I don't see a use for '-R' in this case:

      -R port:host:hostport
              Specifies that the given port on the remote (server) host
              is to be forwarded to the given host and port on the local
              side.

      -L port:host:hostport
              Specifies that the given port on the local (client) host is
              to be forwarded to the given host and port on the remote
              side.

Hope this helps.

Cheers,
Tim

-- 
Tim Kent CCNA CNS
Wilkinson-Kent Consulting Pty Ltd
t +61 7 3862 1963
m 0401 136 141






More information about the General mailing list