I am trying to remotely control a running X session on a computer running Ubuntu 12.04 LTS.
Here is the setup:
- A: Windows 7 64 bit machine (I also have an Arch Linux machine I can use instead, if that is easier)
- P: Ubuntu 11.04 server (GNU/Linux 2.6.38-8-server x86_64). This machine has a public IP, and a domain that refers to it (I will call this domain P).
- Z: Ubuntu 12.05 LTS desktop (GNU/Linux 3.2.0-27-generic x86_64). This machine is behind a NAT which I cannot configure.
I have administrative privileges on all these machines; just not the NAT between Z and the world.
The below describes the means by which I tried to achieve the above-stated objective. It is my hope that you can identify where I went wrong, or suggest to me viable alternatives.
- Configure and start a vnc4server server on Z, following these instructions.
- Forward port 5902 from P to Z via a reversessh tunnel initiated from Z to P, using this command:
(I tried 5902 as well)Code:ssh -nNTR 5901:localhost:5901 myusername@P
- Use vncviewer from A to connect to P:1.
This gives me an error "connect: Connection refused (10061)".