Sunday 23 August 2020

Easy way to SSH in to EC2 instance using ~/.ssh/config.

1. from the local linux machine(on-primise).Issue the below command.

   vi ~/.ssh/config

output for the above command looks like:

    

2.make an entry similar to the above output:

 -----------------------------------------------------------------------------------------------------
Host   <ECC_DEV>

            Hostname  <Public_DNS>

            User ec2-user

            IdentityFile ~/<path of private key in the local linux machine>

------------------------------------------------------------------------------------------------------

#all the bold text are your defined variables,can vary from customer to customer.


3. Save the changes


:wq!

4.That all,to access ssh connect of remote AWS EC2 instance.

in the putty session of local linux machine. issue command as below.

ssh <ECC_DEV>


No comments:

Post a Comment