PowerShell - Copying SSH Keys to Remote HostsΒΆ
Given Windows does not include the ssh-copy-id binary, there are effectively three methods available to copy SSH keys:
- Copy the key to a Linux/macOS host and run
ssh-copy-idfrom there - Copy/paste the public key to
~/.ssh/authorized_hostswhich can be unreliable at times - but does work - Use the
Get-ContentPowerShell cmdlet to perform the equivalent ofssh-copy-id: