After creating AWS EC2 Ubuntu Machine over server they provide you .pem file for login on EC2 machine. When first time I create a machine on AWS EC2 then I face a problem I was not able to ssh AWS EC2 machine by my local Ubuntu system. After google I found a way to ssh with local Ubuntu system. You also able to add more than one user on your AWS EC2 Machine.
First you must have a AWS EC2 Machine over server.
For creating AWS EC2 Machine instance Click on AWS EC2 Machine
Now !
1. ssh using your .pem file something like this.
2. After successful login you copy your local Ubuntu id_rsa public key and paste to this file.
-----------------------------------------------------------------------------------------------------------------------------------
You Also ssh without password in local Machine
Note: You also add multiple User on Your local and AWS EC2 Machine.
Prerequisite requirement:
sudo apt-get install openssh-client
sudo apt-get install openssh-server
First you must have a AWS EC2 Machine over server.
For creating AWS EC2 Machine instance Click on AWS EC2 Machine
Now !
1. ssh using your .pem file something like this.
ssh -2 -i ~/Downloads/blogapp.pem ubuntu@ec2-12-345-67-891.compute-1.amazonaws.com
2. After successful login you copy your local Ubuntu id_rsa public key and paste to this file.
ubuntu@ip-172-31-26-53:~$ nano ~/.ssh/authorized_keys
-----------------------------------------------------------------------------------------------------------------------------------
You Also ssh without password in local Machine
1. ssh-keygen -t rsa
Press enter for each line
2. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
3. chmod og-wx ~/.ssh/authorized_keys
Note: You also add multiple User on Your local and AWS EC2 Machine.
Prerequisite requirement:
sudo apt-get install openssh-client
sudo apt-get install openssh-server
No comments:
Post a Comment