Verifying the correctness of SSH-encrypted reverse VNC connection

2

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?

hqt

Posted 2011-08-30T13:14:34.483

Reputation: 23

TeamViewer does basically the same thing but with a lot less hassle and a couple more guarantees than VNC. – digitxp – 2011-08-30T13:48:51.340

Answers

1

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

phihag

Posted 2011-08-30T13:14:34.483

Reputation: 2 557

Thanks for pointing out the error phihag! The netstat output makes a little bit more sense now. – hqt – 2011-08-31T10:14:43.893