Você pode usar o seguinte em /etc/ssh/sshd_config
:
Match User attie
AuthenticationMethods publickey
Note que Match
seções precisam estar no final do arquivo de configuração ...
Não se esqueça de recarregar o servidor SSH:
systemctl reload ssh
AuthenticationMethods Specifies the authentication methods that must be successfully completed for a user to be granted access. This option must be followed by one or more comma- separated lists of authentication method names. Successful authentication requires completion of every method in at least one of these lists. For example, an argument of "publickey,password publickey,keyboard-interactive" would require the user to complete public key authentication, followed by either password or keyboard interactive authentication. Only methods that are next in one or more lists are offered at each stage, so for this example, it would not be possible to attempt password or keyboard-interactive authentication before public key.