Macos 不带主目录的用户的SSH公钥
我正在运行一个MacOSXLeopard服务器,我创建了一个新用户,但没有为该用户指定主目录。是否可以让该用户使用公钥进行身份验证 我知道当用户有主目录时,它会进入Macos 不带主目录的用户的SSH公钥,macos,ssh,rsa,osx-leopard,Macos,Ssh,Rsa,Osx Leopard,我正在运行一个MacOSXLeopard服务器,我创建了一个新用户,但没有为该用户指定主目录。是否可以让该用户使用公钥进行身份验证 我知道当用户有主目录时,它会进入~/.ssh/authorized_keys 我不想为这个用户创建一个主目录,因为我的理解是,如果有物理访问权限,它将允许他们登录 更新:我只需要允许此用户进行安全的FTP连接。将登录Shell设置为/bin/false/也将阻止它们进行远程连接。您必须编辑/etc/ssh/sshd\u config或它在计算机上的位置,并更改Aut
~/.ssh/authorized_keys
我不想为这个用户创建一个主目录,因为我的理解是,如果有物理访问权限,它将允许他们登录
更新:我只需要允许此用户进行安全的FTP连接。将登录Shell设置为
/bin/false/
也将阻止它们进行远程连接。您必须编辑/etc/ssh/sshd\u 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''.
但是为什么你的用户(可以登录)没有家呢?我希望他们能够进入我指定的文件夹。我将SFTP复制到一个子文件夹。