2009-03-19 20 views
2

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

は、私は私の理解があるので、私はこのユーザーのホームディレクトリを作成する必要はありません

~/.ssh/authorized_keysに、それは、それらがログインできるようになるユーザーがないときは、それが中に入るのホームディレクトリを持っていることを知っています物理的なアクセスが与えられている場合

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

答えて

8

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

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

+0

私が指定したフォルダにSFTPできるようにします。 SFTPをサブフォルダにchrootしました。 – matpie

関連する問題