Você pode usar a diretiva AuthorizedKeysFile
em / etc / ssh / sshd_config para fazer isso. O local padrão é .ssh/authorized_keys
, mas você pode usar algo que contenha um caminho absoluto, por exemplo,
AuthorizedKeysFile /path/to/your/keyfile
as man pages dizem isso
AuthorizedKeysFile
Specifies the file that contains the public keys that can be used for user authentication. AuthorizedKeysFile may contain tokens of the form %T which are substituted during connection setup. The following tokens are defined: %% is replaced by a literal ’%’, %h is replaced by the home directory of the user being authenticated, and %u is replaced by the username of that user. After expansion, AuthorizedKeysFile is taken to be an absolute path or one relative to the user’s home directory. The default is “.ssh/authorized_keys”.