Skip to content

Instantly share code, notes, and snippets.

@tstachl
Created February 20, 2018 22:24
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 tstachl/bd5785b1c556865b07fdc618b18a47a1 to your computer and use it in GitHub Desktop.
Save tstachl/bd5785b1c556865b07fdc618b18a47a1 to your computer and use it in GitHub Desktop.
Steps to set up SSH keys for a newly created user account on my VPS.
# create the directory for ssh
mkdir -p ~/.ssh
# make sure it's editable only for the current user
chmod 700 ~/.ssh
# create the authorized keys file
touch ~/.ssh/authorized_keys
# use your favorite editor to add the public key
vim ~/.ssh/authorized_keys
# set the right access permissions
chmod 600 ~/.ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment