-   Linux - Networking (
-   -   Cannot forward port 5901 (

ccin1492 11-03-2006 08:45 PM

Cannot forward port 5901
Hi, I'm trying to open a vnc session using ssh. I've started the vncserver on the remote machine. I then run the command:


ssh -L 5901:localhost:5905
But then I get this...


bind: Address already in use
channel_setup_fwd_listener: cannot listen to port: 5901
Could not request local forwarding.
Last login: Fri Nov  3 20:35:09 2006 from
Have a lot of fun...

I suspect this is a firewall issue and it't not allowing port 5901 to be forwarded thru the ssh tunnel. Has anyone seen this before or has an idea what might be going on.

Many thanks!

niknah 11-03-2006 11:21 PM

Probably not firewall related.
It looks like you're already running vnc on your local machine, try...

ssh -L 5902:localhost:5905

In your remote machine you should have vnc setup on screen no.5(port 5905) and in your local machine you have to login to "localhost:2"

ccin1492 11-04-2006 12:23 AM

That was it: had the ports backwards. Thanks again.

All times are GMT -5. The time now is 05:55 PM.