SSH Public Key for user without home directory

久未见 提交于 2019-12-01 21:31:54

You have to edit /etc/ssh/sshd_config or where it is located on your machine and change the AuthorizedKeysFile setting.

The docs say:

 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''.

But why do you have users (that can login) without a home?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!