Configuring VNC for EC2 or OpenStack


Mac Users

      1. ssh into the remote instance using the ubuntu account:

                ssh -L 5902:localhost:5902 -l ubuntu instance-ip-address

      1. Before connecting to VNC on the instance for the first time, change your VNC password by running:

                vncpasswd

      1. On the local machine, use 'Screen Sharing' (From Finder, go to /System/Library/CoreServices directory, and double click “Screen Sharing.app”), connecting to ubuntu@localhost:5902, and enter your VNC password. (If you do not remember the password. Use command 'vncpasswd' on the remote instance to reset it).

      2. If you cannot access VNC, you may need to start the server on the remote instance:

               vncserver :2 -depth 16 -geometry 1280x800

      1. If there is connection but the display is all white, try checking ‘open in 32-bit mode’ of ‘Screen Sharing’. Detailed steps: http://astralbodies.net/blog/2010/05/02/mac-screen-sharing-vnc-white-screen/  

      2. If VNC is not working, try the VNC client installation (http://www.realvnc.com/download/viewer/).

      3. When finished, exit ‘Screen Sharing’ first, then exit ssh.


Windows Users

      1. If ssh not available, install PuTTY http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

      2. If no VNC client is installed, install realvnc client:  http://www.realvnc.com/download/viewer/.

      3. Before connecting to VNC on the instance for the first time, change your VNC password by running:

                vncpasswd

      4. ssh into the remote instance using the ubuntu account. On the putty-tunnel page, enter your instance IP address. Type source port: ‘5902’, and destination: ‘localhost:5902’. Then press the ‘Add’ button.

      5. On the local machine, start the VNC client, set its account to be ubuntu, connect to localhost:5902, and enter your VNC password. If you do not remember the password. Use the command 'vncpasswd' on the remote instance to reset it.

      6. If you cannot access VNC, you may need to start the server on the remote instance:

                vncserver :2 -depth 16 -geometry 1280x800

      7. When finished, exit the VNC client first, then exit ssh.


Linux Users

      1. If you don't have a VNC client installed, install realvnc:  http://www.realvnc.com/download/viewer/.

      2. ssh into the remote instance using the ubuntu account:

               ssh -L 5902:localhost:5902 -l ubuntu instance-ip-address

      3. Before connecting to VNC on the instance for the first time, change your VNC password by running:

                vncpasswd

      4. On the local machine, start your vnc client, connect to localhost:5902, and enter your VNC password. If you do not remember the password, use 'vncpasswd' on the remote instance to reset it.

      5. If you cannot access VNC, you may need to start the server on the remote instance:

                vncserver :2 -depth 16 -geometry 1280x800

      6. When finished, exit the VNC client first, then exit ssh.