Last active
December 18, 2022 14:25
-
-
Save Red-Eyed/7934b799e1735381fdcc9780ebe9194b to your computer and use it in GitHub Desktop.
ssh-copy-id for windows
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
type ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh && LANG=C sed 's/[\d128-\d255]//g' >> ~/.ssh/authorized_keys && chmod 0600 ~/.ssh/authorized_keys" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LANG=C sed 's/[\d128-\d255]//g'
is required to remove non ascii characters, such as BOM