Once you have done with configuration of the Ec2 instance you need to login to Ec2 instnace for performing further steps. This post will quickly guide you on how to login to AWS Ec2 instance.
Steps for login to AWS EC2 instance.
Step 1
- Go to Services drop down menu and select EC2.
- Click on respective instance “Running Instances“.
- You will see a server (make sure status of server is running before proceeding).
- Please select respective instance in management console and check and Note down the public DNS value in the instance description as below:
Step 2:
- Now Download
puttygen.exe
(a RSA and DSA key generation utility) andputty.exe
(the SSH and Telnet client ) from here. - Now open “
puttygen.exe
” , - Click on Load button and select the .pem file downloaded during Ec2 configuration.
- Select SSH2-RSA radio button and click on Save private key button. Click yes on next pop-up.
- Now save this file with name and extension .ppk.
- Now open Putty.exe goto Connection ➡ SSH ➡ Auth and browse to select the .ppk file created in above step.
- Click on Session and paste the DNS name copied in step 1-substep 4 and click on load.
- Please check the default user name list as per instance type. You can check the default username here.
- Login with default user described in above step , system will not prompt for password.Just give command “sudo su -” and you are root of the system. Now practice everything on this server.
login as: ec2-user Authenticating with public key "imported-openssh-key" [ec2-user@ip-172-31-9-10 ~]$ sudo su - [root@ip-172-31-9-10 ~]# id uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 [root@ip-172-31-9-10 ~]# date Tue Jan 24 00:12:32 EST 2017 [root@ip-172-31-9-10 ~]# w 00:12:34 up 41 min, 1 user, load average: 0.00, 0.01, 0.05 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT ec2-user pts/0 103.211.42.11 00:08 2.00s 0.01s 0.09s sshd: ec2-user [root@ip-172-31-9-10 ~]#
Leave a Reply