Skip to main content
Mister X's user avatar
Mister X's user avatar
Mister X's user avatar
Mister X
  • Member for 4 years, 4 months
  • Last seen more than 3 years ago
  • Germany
awarded
awarded
comment
How to get access via ssh as root - with public/private key
I am corious how you could set this up to work. The option AuthorizedKeysFile points to .ssh/authorized_keys. If I remove it - it works for me too. So I assume the default values are used, if not changed in the config. But if I change the option PubkeyAuthentication yes to #PubkeyAuthentication yes, it still works. So actually only PermitRootLogin yes needs to be changed I assume. I appreciate you pointing that out. So you could actually boil down the steps to only enable PermitRootLogin yes, generate a keypair & place the public key in authorized_keys of the user directory.
awarded
comment
How to get access via ssh as root - with public/private key
You resolved my problem. Thank you very much. If I place the public key in /root/.ssh/authorized_keys I can login as root. I was so close yesterday tho...
comment
How to get access via ssh as root - with public/private key
@LjmDullaart Yes, I forgot to include that. I set those permissions. Even tho the files are located in /home/pi/ and not /root/. As far as I remember I got an error otherwise and could not proceed any further
awarded
revised
Loading…
Loading…