Hey GUys having a bit over trouble with tunneling VNC over SSH.

I had it working fine in the past, but I went to try again and after reviewing my notes, Superuser, and a few guides it just wont work.

here is what I've been doing.

I have two linux boxes on the same local network.

On the first one (arch linux) I run vncpasswd, set it to a password. I then run vncserver -localhost this starts the vncserver log file is named ...../.vnc/hostname:3.log

On the other linux box (ubuntu) I run ssh -L 5903:IP OF VNC HOST:5901 user@hostname(or ssh config alias)

I then open a new terminal and enter vnc-client localhost:5903 or vncviewer localhost:5903

5903 is the local port, and 5901 is the port vncserver should be listening on.

When running vnc-client I get a window that opens but it says at the bottom "VNC disconnected from localhost:5903. When I run vncviewer localhost:5903 I get a window that opens via TightVNC, however the window is blank and I can't control the mouse. I'm not sure what I'm doing wrong as I used to get this to work all of the time and I can't seem to get it to work anymore.

Any help would be appreciated, I will provide any information that is needed.

And before I get trolled I researched Stack Exchange, Google, and many other places... Nothing works for me.

Thanks in advance.

Edit when trying to run ssh -L local:host:remote user@host I get teh message: Could not open a connection to your authentication agent. Yet it still logs in.

  • PS, before you tell me this question is a duplicate I tried all of the other answeres provided. None seems to work. I used to do this all of the time I'm not sure what the issue is now – Fan Favorites Aug 7 '14 at 23:45
  • I am able to connect to my own vncserver on the localhost:localport in the command ssh -L localport:IP OF SEVER:remoteport user@host but not to localhost:remoteport – Fan Favorites Aug 7 '14 at 23:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.