Skip to content

Instantly share code, notes, and snippets.

@withakay
Created April 27, 2012 09:30
Show Gist options
  • Save withakay/2507784 to your computer and use it in GitHub Desktop.
Save withakay/2507784 to your computer and use it in GitHub Desktop.
.ssh set permissions
// commands to run for your own user from you home directory after you have copied over the authorized_keys file
sudo chmod 600 ~/.ssh/authorized_keys
sudo chmod 700 ~/.ssh
sudo chown my_user_name:my_group_name ~/.ssh/authorized_keys
sudo chown my_user_name:my_group_name ~/.ssh
// commands to run for other users after copying over the authorized_keys file for that user
sudo chmod 600 ../some_other_user/.ssh/authorized_keys
sudo chmod 700 ../some_other_user/.ssh
sudo chown some_other_user:some_other_group ../some_other_user/.ssh/authorized_keys
sudo chown some_other_user:some_other_group ../some_other_user/.ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment