I attempted to set up an SSH tunnel today to access a web application that was only bound to a private IP. I tunneled to my opensolaris box, which worked fine, and then attempted to establish a connection with telnet. Telnet reported that the connection was refused and I saw this on my command line for the tunnel:
$ ssh johndoe@foo.bar.com -L 8080:foo.bar.com:8080 -N channel 2: open failed: administratively prohibited: open failed
I made a pretty silly mistake, but I figure it may save someone’s time to post it here. Of course the connection was refused. My ssh tunnel attempts to establish the connection to the public domain name, which uses the public IP (the same one I’m SSHing into). The web server I’m trying to reach is not bound to that adapter!
Here’s a correct command:
$ ssh johndoe@foo.bar.com -L 8080:localhost:8080 -N