Skip to content

Instantly share code, notes, and snippets.

@ZilchBloke
Last active April 18, 2023 00:07
Show Gist options
  • Save ZilchBloke/246e04e2dca9969bc4f0dad32fc894d4 to your computer and use it in GitHub Desktop.
Save ZilchBloke/246e04e2dca9969bc4f0dad32fc894d4 to your computer and use it in GitHub Desktop.
ssh-copy-id for powershell. (Windows Client to Linux Server)

ssh-copy-id for powershell. (Windows Client to Linux Server)

execute the command as an Administrator.
cat $env:USERPROFILE\.ssh\KeyToServer.pub | ssh <user@linuxserver> "mkdir ~/.ssh/ ; touch ~/.ssh/authorized_keys ; cat >> ~/.ssh/authorized_keys"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment