When I try to use ssh-copy-id -i /root/.ssh/id_ed25519 [email protected], it always returns Permission denied, please try again
I know that ssh-copy-id is a script in which scp and ssh is used. And scp to something like [email protected] will fail. It makes sense to me.
But, after I unlocked the root user following the answer in this post: How to enable root login?, still it fails. Why is that and how can fix that: All I want is to ssh as a root user to 192.168.134.140 without password.
sudo? Else you will not have access intoroothomedir. – Artur Meinild Mar 22 '21 at 13:09ssh-copy-idwithout an existing key on the server, you will need to authenticate via password - as well as enabling root login, that requires that the sshd configurationPermitRootLoginis set (at least temporarily) to allow password authentication for root. Did you do that? – steeldriver Mar 22 '21 at 13:17