Putty tunneling to localhost:5900 works in windows, won't bind to localhost in ubuntu 12.04

1

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

Hoyt Stearns

Posted 2012-05-30T22:13:10.917

Reputation: 11

1Please post the command you are running and any output. Also, what have you tried? – Jeremy W – 2012-05-30T22:21:03.133

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 – 2012-05-30T22:38:45.547

Answers

1

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

Jeremy W

Posted 2012-05-30T22:13:10.917

Reputation: 3 529

ssh replies: bind: Address already in use; channel_setup_fwd_listener: cannot listen to port: 5900; Could not request local forwarding. – Hoyt Stearns – 2012-05-30T23:04:16.890

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 – 2012-05-30T23:16:46.327