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.

I set up an SSH encrypted reverse VNC connection to allow myself to remote into my parents' PC (running Ubuntu) when assistance is needed. A reverse VNC connection was necessary in this case for a number of reasons:

  1. Parents' PC was behind a NAT – and I didn't want to set up port forwarding on their router.
  2. My router has already been set up correctly for this to work.

Here's how I did it:

  1. On (my) helpdesk PC (the PC that will control parents' PC), start vncviewer in listen mode:

    helpdeskpc:~$ vncviewer -listen
    Tue Aug 30 21:15:24 2011
    main:        Listening on port 5500
    
  2. On parents' PC, run this command:

    noobpc:~$ ssh -t -L 5500:helpdeskpc:5500 localhost 'x11vnc -display :0 -connect helpdeskpc'
    

First of all, Have I correctly encrypted my reverse VNC connection?

If so, here is the more interesting question: Being a paranoid person, how can I prove to myself that the VNC connection is indeed going through the SSH tunnel? I can't make heads/tails of the netstat output.

What other tools can I use to verify that the VNC connection is using the SSH tunnel correctly?

share|improve this question
    
TeamViewer does basically the same thing but with a lot less hassle and a couple more guarantees than VNC. –  digitxp Aug 30 '11 at 13:48
add comment

migrated from stackoverflow.com Aug 30 '11 at 13:42

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 1 down vote accepted

Nope, you're not encrypting at all.

No matter what other options you specify,

ssh localhost

creates an encrypted connection the local machine. The command you execute doesn't know anything about that, and connects itself to helpdeskpc. Instead, you want

noobpc$ ssh -L 5500:localhost:5500 helpdeskpc

Then, in a different terminal (or after detaching ssh):

noobpc$ x11vnc -display :0 -connect localhost
share|improve this answer
    
Thanks for pointing out the error phihag! The netstat output makes a little bit more sense now. –  hqt Aug 31 '11 at 10:14
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.