Although this has been posted before by a few folks (some more comprehensive than others depending on your OS / configuration)…I thought I would add my notes to the “Internets” on creating a remote desktop connection to a Amazon EC2 CentOS 5.4 AMI.

  • Install FreeNX package on your instance
  • yum install -y freenx
  • for a KDE desktop
  • yum install -y kdebase
  • for a gnome desktop
  • yum install -y gnome-session
  • navigate to /etc/nxserver and copy the node.conf.sample to node.conf
  • cp node.conf.sample node.conf
  • Edit the node.conf file to enable “ENABLE_PASSDB_AUTHENTICATION=”1″
  • nano node.conf
  • Note that you can click on the image to make it larger.
  • on CentOS, create a user and set the password that will be logging in via remote desktop
  • adduser eric
    passwd eric
  • on nxserver, add the user that you just created and set the password (this is the user the NX client will log in with)
  • nxserver --adduser eric
    nxserver --passwd eric
  • Now that the nxserver is complete we need to configure a client.
  • Use your favorite method to transfer client.id_dsa.key (I used FileZilla SFTP) to the client machine
  • Download and install the NoMachine NX client and fonts
  • Direct the NX Client to use the client.id_dsa.key by clicking the “Configure Button”

  • Then select the “Key” where you can “Import” the client.id_dsa.key …make sure to save.

  • In this configuration menu you can also set the “Desktop” type KDE or GNOME (dependent on what you installed on the server earlier) and host, port and dimension parameters.
  • For username and password…you would obviously use the user earlier created on the server.
  • Upon clicking connect…if everything is configured correctly … a desktop should appear.

That should do it…but if you know of “Harder, Better, Faster, Stronger” ways to do this…please leave a comment.

To complete this task I mostly used the following reference: CentOS Wiki