Skip to content

Instantly share code, notes, and snippets.

@estysdesu
Last active July 21, 2019 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save estysdesu/c9ecb08d316aa0fc1e85162986611859 to your computer and use it in GitHub Desktop.
Save estysdesu/c9ecb08d316aa0fc1e85162986611859 to your computer and use it in GitHub Desktop.
[AWS: EC2 SSH connect] #ec2 #ssh #sh
# change permissions on the key file (read)
chmod 400 <key.pem>
# ssh into the ec2 container
ssh -i "<key.pem>" uname@<ec2-address/ip-address>
# upgrade & update apt package manager (Debian/Ubuntu)
sudo apt update && apt upgrade
# check & update yum package manager (CentOS/RHEL)
yum check-update && yum update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment