Hi,Like with every debian. Create a new file "/root/.ssh/authorized_keys" as root, paste your public key, make it only accessible by the owner and restart sshd.
Did you verify that the key is only using 1 line and that there is no "PermitRootLogin no" in sshd conf?Hi,
I did that but the server keeps refusing the key.
Kind Regards,
Gamerh
In addition to what @Dunuin said - also check the permissions/ownership of .ssh/authorized_keys (600, 400 should work)
This is how i did it:Did you verify that the key is only using 1 line and that there is no "PermitRootLogin no" in sshd conf?
Hi,There are two ways to login as root. Using PAM and PVE authentification. Did you login as root using PAM?
Also you should try to login using a SSH client and not using the WebGUI. If that works with a password you atleast know that it is not a network/firewall problem.
Hi,Thats why I said try it with putty with password authentification first. If thats isn't working too, then you know that the key isn't the problem.
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC7qmegDxzv1omqG2cWM+i+qaEGzCoSBwqCeXyGUU93sTqtNYYHJVGj6YZqXeXEGzJtKm2A/uo59Y+WmqhJW7HcT2Hqvo80NfbIRhqE9TJETyBeGiiC8qpiYgPC2zigCNvTsRXh0CH5FJ1qy4QEBjztQDWOqSrsoOSJEEWCJiKJizTiXDmlGdiKE409GBo8lvlbMRWbrMj3iX825WTqy/T0Pio1kqANDotLnPA0sRXPVyzc/ghzqRHzFetzP9j7C0nhEvjiJphiuYvhbgix79FrCQG0lXBGcAWzsWUeAoT/d3kQu79+UTWxm+z4pnJ7gkKVMejqrWys560SdAqD264dc5UBRGI9j6XxVKdraSaEitDneONrSAt2tE/Rwxh2ASxqQfdF88zyDI8/ma608tHcFROaNsn5hF+/wzjRK9akdhp5WjA5HXhg2OlkwKvSMhGlSgotRj5pr4Ebxjegysy1mEWRFN/vh/oNq4uHQy8adpfogaVELkI/Z2nuAdQk+uMy6D1hrKhUWubmBPxTbG00IWF25Tyuz8hnFRP9+gB/PNRlF59/EHy27a72nirvuOyfxKnx/Mn+FD9Ah59OSLhWuo3sN9Im8yc2cliecwMz+DmTtE7TwzNw9v2zfxU9JDQwyLtppULiGpmKFOLHjz+SVGxSbVsWS//INK1GrQ== gschoenb@gschoenb-X220
Hi,How did you create the key pair? Are you sure it is valid and got no line breaks?
Something like this?
Code:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC7qmegDxzv1omqG2cWM+i+qaEGzCoSBwqCeXyGUU93sTqtNYYHJVGj6YZqXeXEGzJtKm2A/uo59Y+WmqhJW7HcT2Hqvo80NfbIRhqE9TJETyBeGiiC8qpiYgPC2zigCNvTsRXh0CH5FJ1qy4QEBjztQDWOqSrsoOSJEEWCJiKJizTiXDmlGdiKE409GBo8lvlbMRWbrMj3iX825WTqy/T0Pio1kqANDotLnPA0sRXPVyzc/ghzqRHzFetzP9j7C0nhEvjiJphiuYvhbgix79FrCQG0lXBGcAWzsWUeAoT/d3kQu79+UTWxm+z4pnJ7gkKVMejqrWys560SdAqD264dc5UBRGI9j6XxVKdraSaEitDneONrSAt2tE/Rwxh2ASxqQfdF88zyDI8/ma608tHcFROaNsn5hF+/wzjRK9akdhp5WjA5HXhg2OlkwKvSMhGlSgotRj5pr4Ebxjegysy1mEWRFN/vh/oNq4uHQy8adpfogaVELkI/Z2nuAdQk+uMy6D1hrKhUWubmBPxTbG00IWF25Tyuz8hnFRP9+gB/PNRlF59/EHy27a72nirvuOyfxKnx/Mn+FD9Ah59OSLhWuo3sN9Im8yc2cliecwMz+DmTtE7TwzNw9v2zfxU9JDQwyLtppULiGpmKFOLHjz+SVGxSbVsWS//INK1GrQ== gschoenb@gschoenb-X220
It should start with "ssh-rsa AAAAB3Nza" and end with "== someOptionalStuff" all in one line without any spaces except for the one after "ssh-rsa".