How to create and access AWS instance on Linux
create and access AWS instance on Linux
In this article, you will be briefed about how to create and access instance in AWS on Linux Machine. For demonstration am going to install Redhat instance.
Creating and Accessing AWS instance
First, log in to your AWS account and select EC2 from services.
Then, to create an instance you need to click launch instance from Instance menu.
After that, select Redhat instance and proceed to the next step.
And then, select free tier instance type and click next.
And, keep default instance settings and click next.
After, add storage size and type.
Add the tags to your instance.
Configure firewall security group by default am going to allow only ssh protocol for inbound traffic.
You should then cross check your instance configuration.
Create and download the new key pair then click launch icon.
Instance initialization will take few minutes.
Click Connect menu and follow the steps to connect and access the AWS instance on your Linux machine.
Locate to download directory and change the permission for this access key file.
[root@server1 Downloads]# chmod 400 redhat-ec2-ohio-key.pem
Follow the syntax to access instance via ssh
[root@server1 Downloads]# ssh -i " redhat-ec2-ohio-key.pem" ec2-user@18.220.121.11 The authenticity of host ' 18.220.121.11 (18.220.121.11)' can' t be established. ECDSA key fingerprint is SHA256:Tn65xIJA7JyHR+KCP/lErrPHAEtIWZ//NT94KJ6z38E. ECDSA key fingerprint is MD5:10:11:31:44:e2:7b:44:62:72:4e:fd:0b:24:d9:98:d6. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ' 18.220.121.11' (ECDSA) to the list of known hosts. [ec2-user@ip-172-31-36-234 ~]$ Now the Redhat instance is accessible to verify the operating system execute below command. [root@ip-172-31-36-234 ~]# cat /etc/os-release NAME=" Red Hat Enterprise Linux Server" VERSION=" 7.4 (Maipo)" ID=" rhel" ID_LIKE=" fedora" VARIANT=" Server" . . . REDHAT_SUPPORT_PRODUCT_VERSION=" 7.4"
Install vim editor for testing, you can install any package for your own testing.
[root@ip-172-31-36-234 ~]# yum install vim -y
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
rhui-REGION-client-config-server-7 | 2.9 kB 00:00:00
rhui-REGION-rhel-server-releases | 3.5 kB 00:00:00
rhui-REGION-rhel-server-rh-common | 3.8 kB 00:00:00
(1/7):To rhui-REGION-client-config-server-7/x86_64/primary_db | 3.3 kB 00:00:00
.
.
.
.
Installed:
vim-enhanced.x86_64 2:7.4.160-2.el7
Complete!
With this, the installation comes to an end.
Comments ( 0 )
No comments available