Sunday, March 22, 2020

How To Set Up GUI On Amazon EC2 Ubuntu server

Amazon EC2 Linux servers do not come with GUI, all the operations have to be done using ssh client like putty. So if you wish to have a GUI for your Amazon Linux instances, you can achieve it pretty easily. Once you installed the GUI essentials on your server, you can access it via windows, remote desktop client. If you are using Linux, then you can use the VNC viewer as a remote desktop client. In order to have a GUI, a lightweight LXDE desktop has to be installed on your server.

LXDE

  1. Specially designed for cloud-based servers.
  2. Lightweight GUI for Linux
  3. Better interface
  4. Multi-language support
  5. Supports standard keyboard shortcuts
  6. Fast performance
Prerequisites
  1. A running Ubuntu ec2 instance.
  2. Security group inbound traffic configured for ssh and RDP access (22 and 3389)
Note: This setup is tested on Ubuntu 18.x server

Getting Started

Step 1: Connect to the server using ssh client putty. How To Connect Ubuntu Server Using Putty
Step 2: Make sure that RDP port is enabled on the Ubuntu instance in which you are going to install lxde. Update the server and install lxde using the following commands.
12sudo apt-get update -y   sudo apt-get install lxde -y
Step 3:  Install xrdp to establish a remote desktop connection since you can’t have a GUI using putty. Use the following command to install xrdp
1 sudo apt-get install xrdp -y
Step 4: Set a password for the default user “ubuntu”, as remote desktop connection requires username and password.
1sudo passwd ubuntu
Note: You can set up your own user and password for remote desktop
Step 5: Start the windows remote desktop client and enter the public DNS or the public IP of your server instance and hit connect.
Step 6: Enter the username and password of the server instance that we created in step 5 and hit ok. Make sure RDP 3389 is enabled in your security group.
Bingo!! you can start using your Ubuntu server with GUI via the remote desktop connection.

http://www.codingvilla.in/how-to-set-up-gui-on-amazon-ec2-ubuntu-server

How to Setup Password Authentication For AWS ec2 Instances

By default, ec2 instances don’t have password authentication. You have to use the private key to connect to the instances. However, you might have situations to use password-based authentication for your ec2 instances. In this tutorial, I have added the configurations required for password authentication for ec2 instances.

Password Authentication For AWS ec2

I assume that you have an instance up and running. Follow the steps given below for the password authentication setup.
Note: I higly discourage using password authentication on cloud instances unless required. It is always safe to use key based authentication.
Step 1: Log in to the server using ssh client of your choice using the private key. For Windows machines, you can use putty for connecting to the instance. If you want the steps, you can follow this article. Connecting ec2 instance using putty.
If you are using Mac or Linux, you can use the following command to connect to the instance.
1ssh -i your-key.pem username@(public-ip-address)
Step 2:  Open the sshd_config file.
1sudo vi /etc/ssh/sshd_config
Step 3:  Find the Line containing “PasswordAuthentication” parameter and change its value from “no” to “yes
1PasswordAuthentication yes
If you want to set up “root” login, find  “PermitRootLogin” parameter and change its value from “prohibit-password” to “yes
After the changes, save the file and exit.
Info: Learn all AWS administration essentials using this AWS Certified SysOps Administrator course
Step 4: Setup a password for the user using the “passwd” command along with the username.  You need to enter the password twice. For example, if you want to set up a password for “ubuntu“, use the following command.
1sudo passwd ubuntu
Step 5: Now, restart the “sshd” service using the following command.
1sudo service sshd restart
Step 6: Now you can log out and log in using the password you set for the user. For example,
1ssh ubuntu@35.162.225.240
I hope this article helps. Let me know in the comment section if you face any errors.

http://www.codingvilla.in/how-to-setup-password-authentication-for-aws-ec2-instances

Best AI Tools for Programmers: An In-Depth Analysis

  In the software development space, the footprint of Artificial Intelligence (AI) is growingly felt more deeply, in that it is completely...