connect to ec2 instance ssh ubuntu code example Example: ssh into ec2 from ubuntu sudo chmod 400 ec2.pem ssh -i ec2.pem [email protected]