Simple ssh tunnel


Our company’s internet connection is set behind a NAT by our ISP. In order to do remote administration of our (very small) LAN, I am trying to set-up an SSH tunnel through our Dreamhost account. But this is my very first experience with tunnels, and I can’t get it work.

I would like to access a server on our LAN from a from oustide network through an SSH shell.

The host I want to have access to:

remote$ ssh -R 55555:localhost:22

On the machine from where I want to do the administration:

local$ ssh -L

Now, I should be able to log-in:

local$ ssh -p 55555
But I get the following error:

ssh: connect to host port 55555: Connection refused

I choose the port at random between 49152 and 65535, because I think that this shouldn’t interfere with anything else.

I thought that SSH tunnelling might be disabled in DH, but from previous threads in this forum, I see that it IS possible.

Anyone knows what I’m doing wrong?


This other login method fails also:

ssh -p 55555 localhost
with the following error:

ssh_exchange_identification: Connection closed by remote host

And on an open ssh terminal on DH I the following message appears:

myhost$ channel 3: open failed: administratively prohibited: open failed


I just solved this myself:

remote$ ssh -R 55555:localhost:22
local$ ssh -L 55555:localhost:55555
local$ ssh -p 55555 localhost