Skip to content

Instantly share code, notes, and snippets.

@tkhduracell
Last active August 29, 2015 14:17
Show Gist options
  • Save tkhduracell/96a4775841775c21d085 to your computer and use it in GitHub Desktop.
Save tkhduracell/96a4775841775c21d085 to your computer and use it in GitHub Desktop.
How to install SSH key
#
[email protected]
T_KEY=~/.ssh/mykey.pub
#
ssh $T_HOST 'umask 0077 && mkdir -p ~/.ssh && touch authorized_keys'
cat $T_KEY | ssh $T_HOST 'cat >> ~/.ssh/authorized_keys && echo "Key copied succefully"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment