Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

At the office I have on the servers a vnc server running. In Windows I use putty to connect to the server, I log in and then use realvnc to see the desktop. But I cannot get this to work on Linux. I have done it in the past struggling but never again. What I have done is try to bind my localhost to the port 5901 and then to the port 5901 on the server machine

ssh -L

I am using the vnc client "remote desktop viewer". Best,

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Try ssh -f -L 5901:localhost:5901 -N

share|improve this answer
Yes, it seems to be a syntax problem. 5901 will also only work if the vncserver was started on port 1 (e.g., 'vncserver :1') – Barthelemy Oct 13 '10 at 20:08
yes. 5901 is just from the example above. the first port is the local port, the second port is the remote port btw. – txwikinger Oct 13 '10 at 20:17

Your Answer


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.