Microsoft is finally shipping Windows with SSH. On my Windows 10 machine, it’s OpenSSH:
PS C:\Users\Kasper> ssh -V
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
Somehow they missed to get the ssh-copy-id tool implemented, so we need to find another way of copying our ssh keys. Thankfully it’s not that complicated, we can use powershell (probably even cmd)
cat .\.ssh\id_rsa.pub | ssh -l username ssh_server "cat >> .ssh/authorized_keys"
This will concatenate (cat) your ssh key to the authorized_keys file on your ssh_server.
I’m using cat, to make it easy for Linux/unix admins, type, and get-content will also do, as both cat and type are aliases for get-content. I assume “type” will be available in cmd.exe