Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@phunehehe
Created March 15, 2013 07:21
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 phunehehe/5168066 to your computer and use it in GitHub Desktop.
Save phunehehe/5168066 to your computer and use it in GitHub Desktop.
Add self's SSH key to another account to gain access

Add self's SSH key to another account to gain access

user=xyz
sudo mkdir -p /home/$user/.ssh
sudo cp -i ~/.ssh/authorized_keys /home/$user/.ssh/
sudo chown -R $user:$user /home/$user/.ssh
sudo chmod -R go-rwx /home/$user/.ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment