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