3

Mac OS X Leopard Server を実行しており、そのユーザーのホーム ディレクトリを指定せずに新しいユーザーを作成しました。そのユーザーに公開鍵を使用して認証させることは可能ですか?

ユーザーがホームディレクトリを持っている場合、それが入ることを私は知っています~/.ssh/authorized_keys

このユーザーのホーム ディレクトリを作成したくありません。これは、物理的なアクセス権が与えられた場合にログインできるようになるためです。

更新:このユーザーにセキュア FTP 接続のみを許可する必要があります。ログイン シェルを に設定する/bin/false/と、リモート接続もできなくなります。

4

1 に答える 1

10

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

しかし、なぜあなたは家のないユーザー(ログインできる)を持っているのですか?

于 2009-03-19T18:32:46.443 に答える