Skip to content

Instantly share code, notes, and snippets.

@phunehehe phunehehe/ssh.md
Created Mar 15, 2013

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