Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing VNCServer on Google Cloud Computing VM (UBUNTU)

I'm trying to install VNCServer on my VM box in Google Compute Engine (GCE), but it was not successful.

I have followed the steps given in this article.

But still unsuccessful. I get the following error:

"Time Out Waiting for a response from the host computer"

Can someone please let me know what's wrong here?

like image 774
user3648235 Avatar asked Oct 19 '22 08:10

user3648235


1 Answers

Installing a VNC Server on an Online Server needs a few basic steps as given below. This can be applied for any server type like AWS EC2, GCP Compute Engine, Azure VMs or even a server in a private cloud.

1) Step 1: Install a VNC Server on a machine

The installation steps might be different based on the Operating System. So Google and follow any guide that suits your OS. Make sure you set up a proper username and password for the VNC account on the server, after installation.

eg: CentOS - Guide

2) Open 5901 Port from server

This can be a firewall configuration, network configuration or even a security group configuration. This depends on the server you are using.

3) Check whether the VNC server is running on the server

If you have installed vncserver, you can simply use the following command to start the server.

vncserver

And run the following command to see what VNC servers are currently active.

vncserver -list

4) Check whether the VNC server is accessible from outside

Open up a terminal and run the following command. Let us assume your server Public IP is 104.197.91.140.

$ nc 104.197.91.140 5901
// alternatively you can use telnet
$ telnet 104.197.91.140 5901

// the response should like this
RFB 003.008

If this is successful, the you can proceed to the next step. If not, it means one of the following.

  • Your server does not expose port 5901 and your public IP is not accessible
  • You server does not have a proper VNC installed.

5) Connect using your VNC Client

This depends on the operating system you are using. So, you can simply google and find out your relevant application.

like image 136
Keet Sugathadasa Avatar answered Oct 22 '22 00:10

Keet Sugathadasa