Skip to content

Instantly share code, notes, and snippets.

@ana-cc
Created December 2, 2020 21:36
Show Gist options
  • Save ana-cc/3168fe749b4e533de1d252c52bf26b52 to your computer and use it in GitHub Desktop.
Save ana-cc/3168fe749b4e533de1d252c52bf26b52 to your computer and use it in GitHub Desktop.
One-liner to add public key to authorized key file on remote machine
ssh user@host 'mkdir -p .ssh && cat >> .ssh/authorized_keys' < ~/.ssh/id_rsa.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment