I'm having a lot of trouble using SSH tunnel to access my local host. I have been using the below and can't access my locahost over the web like this.

ssh -nNt -vg -g -R :9999:localhost:8080 user@tunnel.mydomain.com

I have tried various combinations of settings and have not been able to get it to work. Here is the response I get in terminal, everthing looks good but when I go to tunnel.mydomain.com I just see the site which is there

Authenticated to tunnel.mydomain.com ([69.163.220.169]:22).
debug1: Remote connections from :9999 forwarded to local address localhost:8080
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: remote forward failure for: listen 9999, connect localhost:8080
Warning: remote port forwarding failed for listen port 9999
debug1: All remote forwarding requests processed

has anyone got any tips? I really need this setup so I can test an application which needs to be avaialable over the web.

link|improve this question
Are you able to tail the auth.log or another log on the host machine while tring to connect? – Rob Feb 4 at 21:07
Could you check if the server (tunnel.mydomain.com) enables TCP forwarding? – fajran Feb 4 at 21:25
thanksf for the help guys, I did some research on your answers and I understand the situation better now. firstly I don't have acces to auth.log so unfortunately in this case will have to leave that. @fajran it turns out I don't have TCP forwarding enabled so there in lies the problem. thanks very much for your help guys and hope you have a good weekend. cheers. will – vancouverwill Feb 4 at 22:24
The sshd_config option GatewayPorts is relevant here also – Croad Langshan Feb 5 at 16:58
feedback

migrated from stackoverflow.com Feb 4 at 22:28

This question came from our site for professional and enthusiast programmers.

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown