EC2 (Elastic Cloud Computing):
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to allow you to obtain and configure capacity with minimal friction and to make web-scale cloud computing easier for developers.
Amazon is elastic/flexible, supports lot of OS flavours
Default users to login to ec2:
ec2-user
ubuntu
centos
root
admin
To configure password less authentication between 2 ec2 instances:
- Login to ec2 instance and change ssh configuration file /etc/ssh/sshd_config as below
PermitRootLogin prohibit-password to PermitRootLogin yes
PasswordAuthentication no to PasswordAuthentication yes
Then restart ssh
RHEL à service sshd restart
Ubuntu à service ssh restart
To have password less authentication between 2 instances, master and slave:
- Generate the keys using ssh-keygen on master
- Copy the keys using from master to slave using
ssh-copy id -I ~/.ssh/id_rsa.pub root@slave
ec2 instances:
When you launch an EC2 instance, you receive a Public IP address by which that instance is reachable.
Once you stop that instance and restart the you get a new Public IP for the same instances.
So, Public IP gets changed every time for an instance after stop/start.
To overcome with this problem, we attach an Elastic IP to an Instance which doesn't change after you stop / start the instance as many times.
Advantage of Having Elastic IP
-> It is kind of static IP for your Instance.
-> Doesn't change after stop/start.
Note: If you have Elastic IP in your account and it’s not in use, then you will be charged for it.
Comments
Post a Comment