Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have configured PHPMyAdmin on an Ubuntu Server to be accessible only from

I am then trying to access it through an SSH tunnel, but I still obtain the Forbidden error.

When using SSH on the server, I can use Lynx to go to localhost/phpmyadmin; so I know it's working at least there.

The command I've used for the tunnel is ssh -L localhost.

share|improve this question
up vote 4 down vote accepted

Your tunnel needs to be,

ssh -L 8080:localhost:80 yourserver

and you run that command from the remote machine. It creates a tunnel from you to yourserver, via port 8080 at your end. On yourserver it then shoves anything it sees into localhost on port 80.

Your command was getting it to send traffic to port 80 on your servers address (which probably isn't

share|improve this answer
ah, great!!!! that was it! thanks a lot!! – Yusuf Jul 9 '11 at 21:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.