Score:0

FreeIPA - ssh as root prompted for password

mm flag

I know the access via root won't work (client sshd_config and restricted account in FreeIPA). But is there a way to blacklist root either on the host or on FreeIPA so it's denied immediately rather than prompting for a password?

I'm wondering if I'm missing something... If not possible then I guess my next goal will be to log root attempts via FreeIPA and alert/report on them.

Score:0
vn flag

You should be able to do something like this in sshd_config:

Match User root
  AuthenticationMethods publickey

Match User *
  AuthenticationMethods publickey,password

Possibly add an AuthorizedKeysFile /dev/null to the root config as well.

Jacob Evans avatar
br flag
can't you do `AuthenticationMethods none`
vn flag
I don't think so: "none" (used for access to password-less accounts when PermitEmptyPasswords is enabled).
okapi avatar
us flag
There's also `PermitRootLogin no` or `prohibit-password`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.