I just started out with Amazon web services and was able to launch an instance. A friend showed me a sample tutorial of how to connect to AWS with ssh. Pretty neat. I downloaded the key and edited /.ssh/config file. Sample of the config file
Host *
ServerAliveInterval 300
Host <name desired to connect>
HostName <domain name>
port 22
User ubuntu
IdentityFile /pathname/keyfile
My question is what if i have 2 instances and now i want to ssh to the new instance launched. How will i edit the config file. I'm stuck and also new to Linux(been learning Linux yesterday and it's pretty cool and powerful). Thanks for the help.
You can ssh to any ec2 instance by running this on terminal:
ssh -i path_to_pem_file ubuntu@<HostIP_or_NAME>
eg.
ssh -i /temp/root1.pem [email protected]
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments