Here is a artical on how to connect two ec2 instances using ssh in Windows?
Its was really god experiance while learning about ssh and wanted to share small connectivity of above topic:
1] Create two aws EC2 instances with same key pair.
i.e Named as:- 1]ssh_instance_orignie, 2]ssh_instance_destination
now, connect to your first instance(ssh_instance_origine), connect using ssh.
for that copy ssh example link which is given in ssh connection tab.
Now, Open windows terminal
set a Current Directory as a Downloads:- #cd Downloads
Check the File ssh-instance.pem available in Downloads by applying command #dir or in linux $ls
Then, paste that copyed ssh example in cmd and hit enter.
now your ssh_instance_origine will be connected to your local Machine
Then, goto ssh file by entering $cd .ssh
Check the List by entering $ls
you will get a authorized_keys file just open it using $cat authorized_keys.
Now, Open new windows terminal,
goto Downloads directory using #cd Downloads
now you will get ssh-instance.pem file, open it and copy whole key from there
for opening the file use command #type ssh-instance.pem
copy all key
Now, go to 1st ssh_instance-origine terminal and create file ssh-instance2.pem file by using command #vim ssh-instance2.pem
paste the key and save it.
check for the file created or not
Step 2]:-
Now open new windows terminal and go to directory Downloads using #cd Downloads
Now give the permission for ssh-instence.pem file to read only by applying command
#attrib -r ssh-instance.pem
Then, Try to connect ssh_instance_destination to the windows terminal by coppying ssh example which is present in ssh connect.
Hence, we have successfully connected our both the instances.
.
.
.
..
.
.
#trainwithshubham,#shellScript,#linux,#cloud.
#Devops