Created
December 2, 2020 21:36
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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