0

I have a windows server ssh client trying to send a generated ssh public key to a linux ssh server.

openssh for windows doesn't have ssh-copy-id so I found this alternative through powershell:

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

the problem is, it assumes the user to authenticate in order to send the public key is the windows user, in this case "administrator" however the remove server user is "root". How can tell this "type" command it should use "root" user instead of "administrator"?

enter image description here

1 Answer 1

1

Instead of ssh 10.0.0.20 use ssh [email protected].

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .