SSH Authentication Options in sshd_config

The /etc/ssh/sshd_config file has an entry called AuthenticationMethods.

Typically you would enter either:

AuthenticationMethods "password"

or

AuthenticationMethods "publickey"

to indicate which authentication method should be required. You can also enter:

AuthenticationMethods "password" "publickey"

to indicate that either authentication method should be required. You can also enter:

AuthenticationMethods "publickey,password"

to indicate that both authentication methods should be required.

  • If a server requires both publickey and password, then call AuthenticatePwPk.
  • If a server accepts only password authentication, then call AuthenticatePw.
  • If a server accepts only publickey authentication, then call AuthenticatePk.
  • If the server allows either publickey OR password authentication, then any of AuthenticatePw, AuthenticatePk, or AuthenticatePwPk may be called.