Skip to content

Instantly share code, notes, and snippets.

@bq1990
Last active November 30, 2017 00:26
Show Gist options
  • Save bq1990/ffff391f135d3031b13a9a0f735dabde to your computer and use it in GitHub Desktop.
Save bq1990/ffff391f135d3031b13a9a0f735dabde to your computer and use it in GitHub Desktop.
cat ~/.ssh/id_rsa.pub | ssh <user>@<hostname> 'umask 0077; mkdir -p .ssh; cat >> .ssh/authorized_keys && echo "Key copied"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment