Configure VNC for Amazon Cloud EC2 Redhat version from Windows

Configure VNC for Amazon Cloud EC2 Redhat version from Windows

1. Start the Redhat EC2 Machine from Amazon Web Service Cloud.

2. Connect with Redhat EC2 Machine with putty.

Connect with Linux EC2 instance

3. Switch ec2-user to root user for install the following packages.

sudo su -

4. Install the following packages in same sequence with root user.

yum groupinstall 'Server with GUI'
yum install -y pixman pixman-devel libXfont
yum -y install tigervnc-server

5. You can set password for ec2-user

passwd ec2-user

6. Open the /etc/ssh/sshd_config file and set following parameter

cd /etc/ssh
vi sshd-config
--set the following parameter to YES option and uncomment with NO option
password authentication parameter to yes
ChallengeResponseAuthentication to yes

Change SSHD config file

7. Restart the sshd service using the below command service sshd restart

[root@ip-172-31-16-82 ssh]# service sshd restart
Redirecting to /bin/systemctl restart sshd.service

8. Exit the root user and connect with ec2-user

[root@ip-172-31-16-82 ssh]# exit
logout
[ec2-user@ip-172-31-16-82 ~]$

9. Setup a VNC password with command vncpasswd

[ec2-user@ip-172-31-16-82 ~]$ vncpasswd
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
A view-only password is not used
[ec2-user@ip-172-31-16-82 ~]$

10. Start a VNC Server using the below command vncserver :1

[ec2-user@ip-172-31-16-82 ~]$ vncserver :1
xauth: file /home/ec2-user/.Xauthority does not exist

New 'ip-172-31-16-82.us-east-2.compute.internal:1 (ec2-user)' desktop is ip-172-31-16-82.us-east-2.compute.internal:1
Creating default startup script /home/ec2-user/.vnc/xstartup
Creating default config /home/ec2-user/.vnc/config
Starting applications specified in /home/ec2-user/.vnc/xstartup
Log file is /home/ec2-user/.vnc/ip-172-31-16-82.us-east-2.compute.internal:1.log
[ec2-user@ip-172-31-16-82 ~]$

VNC Putty connection.PNG

11. In AWS Cloud, we need to go to Security group of EC2 Redhat Linux instance and open the VNC port 5901 for connectivity, for multiple connectivity 5900-5910 port need to open.

Go to EC2 Dashboard --> Select the Redhat machine --> Below on description tab, Select the security group to modified --> In Security group go to inbound --> add new rule ---> TCP --> PORT RANGE : 5900-5910 , SORUCE: anywhere --> Save it

12. Install your vnc viewer of ULTRA VNC Viewer or as you want.

For connectivity use public address or Public IP with PORT 5901
Enter : at vnc viewer window
Enter password set for VNC Server in step 9

VNCViewer.PNG

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.