2016-02-07

Ubuntu Server 14.4 で sshd -t するとエラーが出るんだけどこれは何だろう?

sshd -t は、/etc/ssh/sshd_config の設定内容などをテストしてくれるコマンドだ。Ubuntu Server 14.4 で実行してみたら、こんなエラーが出るんだけど何でだろう?
# sshd -t
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/etc/ssh/ssh_host_ed25519_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /etc/ssh/ssh_host_ed25519_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key
ssh_host_ed25519_keyは、秘密鍵のファイル名だけど、パーミッションを調べたら、
-rw-r--r--  1 root root
となっていて誰でも読めてしまう状態になっていた。だから、
# chmod 600 ssh_host_ed25519_key
ってやったらエラーは出なくなった。けど、なんでパーミッションがこんな状態になっていたのかよく分からない。

0 件のコメント: