Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Putty tunneling to localhost:5900 works in windows, won't bind to localhost in ubuntu 12.04. How can I get it to bind?

share|improve this question
1  
Please post the command you are running and any output. Also, what have you tried? –  Jeremy W May 30 '12 at 22:21
    
Thanks for the quick reply! I run putty with tunneling e.g. L127.0.0.54:5900 192.168.0.54:5900 . When I run vnc, it just brings up the local machine. This works fine from windows. I've tried enabling many things in sshd_conf and restarting, and other local ports such as 127.0.0.1. I've also tried ports 80. –  Hoyt Stearns May 30 '12 at 22:38
add comment

1 Answer

bind: Address already in use means that the local port you want to connect to is already in use. In your case port 5900 is already in use on your Ubuntu host running a VNC server.

Try the connection using a different local port such as 33002 like this:

ssh -L 33002:192.168.0.54:5900

share|improve this answer
    
ssh replies: bind: Address already in use; channel_setup_fwd_listener: cannot listen to port: 5900; Could not request local forwarding. –  Hoyt Stearns May 30 '12 at 23:04
    
Ah, I understand -- windows isn't so picky -- I guess I'll have to either shut down vnc and http servers or do some fancy port changes, however right now I get "bash: 192.168.0.54: command not found" with a different but unused local port. I wonder what's up with that. –  Hoyt Stearns May 30 '12 at 23:16
    
That works :-) . Thanks –  Hoyt Stearns May 30 '12 at 23:52
add comment

Your Answer

 
discard

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.