Understanding SSH
- We create a key pair which includes private & public key
- public key is copied into linux
- using ssh command
ssh -i <path to private key> username@ipadresswe establish the connection password less

- The default location of keys on any os
- private
~/.ssh/id_<algo> - public
~/.ssh/id_<algo>.pub
- private
- To create a key pair the command is
ssh-keygen
Key Pairs in AWS
- While creating ec2 instances we can get the keys generated by AWS, AWS gives us the private key and keeps the public key.
- While create ec2 AWS will copy the public key into linux machines for ssh connectivity
- AWS also allows you to use your keys i.e. you import public key into AWS key pair
- AWS Keys belong to a region
- AWS EC2 instances by default will not have passwords enabled
Key Pairs in Azure
- Azure has a service called as SSH Keys
- While creating VMs in Azyre we can get the keys generated by SSH Keys, Azure gives us the private key and keeps the public key.
- While create VM Azure will copy the public key into linux machines for ssh connectivity
- Azure also allows you to use your keys i.e. you import public key into SSH Keys service
- Azure allows both password & Key based.
Lets import ssh key into AWS
- For AWS watch classroom video
- In Azure Refer Here for importing and generating keys
