你必须编辑
/etc/ssh/sshd_config
或者它在您的机器上的位置,并更改
AuthorizedKeysFile
背景
文件说:
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 fol-
lowing 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''.
但是为什么你的用户(可以登录)没有家呢?