I have configured PHPMyAdmin on an Ubuntu Server to be accessible only from 127.0.0.1.
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 8080:mysite.com:80 localhost
.
Your tunnel needs to be,
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 mysite.com address (which probably isn't 127.0.0.1)