Skip to content

Instantly share code, notes, and snippets.

@donrestarone
Created November 21, 2020 14:48
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 donrestarone/5146ab69a03319a599d7f7a8427acbfc to your computer and use it in GitHub Desktop.
Save donrestarone/5146ab69a03319a599d7f7a8427acbfc to your computer and use it in GitHub Desktop.
setting up SSH via .ssh/config
# make sure to move your .pem file for SSH auth to ~/.ssh & chmod 0400 the file
chmod 0400 your-server-identity.pem
# open ~/.ssh/config with your favorite text editer and drop in the following plumbing (replace the IP/host of your server and username and point to the correct pem file)
Host my-server
HostName 54.157.228.255
User your-user-name
IdentityFile ~/.ssh/your-server-identity.pem
IdentitiesOnly yes
# after saving the file you can simply ssh into the server like so:
ssh my-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment