Timeline for How to get access via ssh as root - with public/private key
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 27, 2021 at 16:21 | comment | added | user130167 | Disable the root login that is for a password login, it is what we want to avoid with the keys method. Nothing needs to be changed in the default file for it to work with a key in the `/root/.ssh/authorized_keys file. | |
Feb 27, 2021 at 15:51 | comment | added | Mister X |
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.
|
|
Feb 26, 2021 at 22:05 | history | edited | user130167 | CC BY-SA 4.0 |
added the usage of it only for a specific purpose
|
Feb 26, 2021 at 21:57 | history | edited | user130167 | CC BY-SA 4.0 |
put path to the keys file so no doubt of the locatiion.
|
Feb 26, 2021 at 21:44 | history | answered | user130167 | CC BY-SA 4.0 |