LoginSignup
2
0

More than 1 year has passed since last update.

Debian Stable(Bullseye) ユーザーは .ssh/config に UpdateHostKeys yes を陽に設定するべきである

Last updated at Posted at 2023-04-26

OpenSSHにはUpdateHostkeysという設定がある。OpenSSH 6.8で導入され、OpenSSH 8.5でデフォルトで有効化された。
変更されたホスト鍵を自動的に受け取ることができる機能である。

この設定に関連して記憶に新しいのは、GitHubのホスト鍵変更である。UpdateHostkeysが有効であれば、ECDSA鍵を受け取っているから影響を受けないはずであった。私のマシンで直接確認することは叶わなかったが、~/.ssh/known_hosts.autoにgithub.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= 1を手動で書き足すことにより確認することができた。

問題は、現行のDebian stableであるBullseyeでは、OpenSSHは8.4だということである。つまりUpdateHostkeysは明示的に設定する必要がある。

Host github.com
        Hostname github.com
        User git
        UpdateHostKeys yes
        StrictHostKeyChecking yes
  1. https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints に(改竄がないことが保証されている)同じ文字列がある

2
0
0

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
2
0