ssh-copy-id equivalent in Windows with PowerShell

PHOTO EMBED

Sun Feb 05 2023 10:29:19 GMT+0000 (Coordinated Universal Time)

Saved by @SphynxCoder #powershell #ssh

type $env:USERPROFILE\.ssh\id_rsa.pub | ssh {IP-ADDRESS-OR-FQDN} "cat >> .ssh/authorized_keys"
content_copyCOPY

> This will overwrite existing keys!