Linux: Is it possible to use the ssh key pair instead or in addition to the root privileges?

I'm facing the problem of securing an embedded platform. All ssh hardening have been setup, including 2 factor authentication and login with ssh key pairs.

Now, the root and user passwords are ridiculous easy to crack, all you need is physical access to the device, leaving all measures and precautions redundant. My idea is to harden the root access with the same techniques as ssh.(hardening the sudo command and root access) However while it is a common problem across all embedded platforms, I can't find much information on this.

How do I tackle this?


Solution 1:

I am not sure what exactly you are asking for so I'll take a guess and assume that you want to harden your sudo authentication.

If this is the case and sudo on your system supports PAM then have a look at pam_ssh_agent_auth for ssh public key authentication or at pam_sss_gss (which may require properly setup FreeIPA IdM).