1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

OpenSSH 6.6.1p1 にて sshd_config の StrictModes (yes|no) それぞれの authorized_keys パーミッションの挙動について

Last updated at Posted at 2017-03-01

OpenSSH 6.6.1p1 sshd_config StrictModes パラメーターごとの、authorized_keys パーミッション設定の挙動について

  • CentOS 7.2 パッケージ : openssh-server-6.6.1p1-25.el7_2.x86_64

/etc/ssh/sshd_config StrictModes yes 時(デフォルト)の挙動

  • authorized_keys パーミッションが、オーナー(owner)以外に読み込み権限のみある場合、公開鍵認証は許可される。
  • authorized_keys パーミッションが、オーナー(owner)以外に書き込み権限がある場合、公開鍵認証は拒否される。
  • authorized_keys パーミッションが、オーナー(owner)に対して読み込みのみでも、読み書き両方に権限があっても、公開鍵認証に影響は無い。

/etc/ssh/sshd_config StrictModes no 時の挙動

  • authorized_keys パーミッションが、オーナー(owner)以外に読み込み権限のみある場合、公開鍵認証は許可される。
  • authorized_keys パーミッションが、オーナー(owner)以外に書き込み権限がある場合でも、公開鍵認証は許可される。
  • authorized_keys パーミッションが、オーナー(owner)に対して読み込みのみでも、読み書き両方に権限があっても、公開鍵認証に影響は無い。

authorized_keys ファイル以外への影響

  • 2017/3/1 時点では未調査
  • man sshd_config を参照するに、"Specifies whether sshd(8) should check file modes and ownership of the user's files and home directory before accepting login." と書かれているのみで、user's files が具体的にどれを指すのか列挙されていない。
  • 他のホームディレクトリ内に設置される openssh 関連ファイル、ディレクトリに影響があると考えられる。
1
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?