Created
November 21, 2020 14:48
-
-
Save donrestarone/5146ab69a03319a599d7f7a8427acbfc to your computer and use it in GitHub Desktop.
setting up SSH via .ssh/config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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