Private vs. Public IPs & SSH (Key Pairs)
EC2 instances can have both private and public IP addresses. Understanding the difference is crucial for network security and access control. Private IPs are used for internal communication, while public IPs allow internet access.
Private IP Addresses
A private IP address is only accessible within your VPC and cannot be reached from the internet. Private IPs are used for communication between instances within the same VPC or connected networks.
Public IP Addresses
A public IP address is reachable from the internet. EC2 instances in public subnets typically get public IPs automatically. Public IPs are used when you need to access your instance from the internet.
SSH Key Pairs
SSH (Secure Shell) is a protocol for securely accessing remote servers. AWS uses SSH key pairs for authentication instead of passwords. You create a key pair, download the private key, and use it to connect to your EC2 instances.
