Sunday 23 August 2020

How to SSH into your EC2 instance

 SSH is one of the most important function.It allows you to control a remote machine,all using the command line interface.

Practical steps:


  1. Collect the Public DNS info from the AWS console.


2. login in to login(on-premise) linux host.

3. cd to the directory,where your private key is available.

4.issue the OS command: chmod 777 <private_Key>

5.issue the SSH command to control the remote system:
   
    ssh -i ./<private_key.pem> ec2-user@<DNS>

the above command works only if the private key location directory and  PWD is same.

in place <DNS>, provide public DNS name as shown in step1.

 6. That's it you got remote system access now.perform your activity in the remote system with command line interface(CLI).

7.to exit from SSH connection, provide exit command.So that remote host connection will close here. 

No comments:

Post a Comment