Skip to content

Instantly share code, notes, and snippets.

@tstachl tstachl/ssh_setup.sh
Created Feb 20, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.