Skip to content

Instantly share code, notes, and snippets.

@Elyorbe
Created October 22, 2021 06:51
Show Gist options
  • Save Elyorbe/21fd7c3a52686a5aadcb1058483d4e33 to your computer and use it in GitHub Desktop.
Save Elyorbe/21fd7c3a52686a5aadcb1058483d4e33 to your computer and use it in GitHub Desktop.
ssh-copy-id for windows
# First generate public/private key if doesn't exists
ssh-keygen
# For PowerShell
type $ENV:USERPROFILE\.ssh\id_rsa.pub | ssh username@host "cat >> .ssh/authorized_keys"
# For CMD
type %USERPROFILE%\.ssh\id_rsa.pub | ssh username@host "cat >> .ssh/authorized_keys"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment