LoginSignup
33
21

More than 5 years have passed since last update.

sshd_config に RSAAuthentication no を設定する必要はもうない

Last updated at Posted at 2017-09-27

新しいサーバを立ち上げていつも通りに公開鍵認証を使うように設定していたら、sshdからエラーが出たので調べてみた。

/etc/ssh/sshd_config line **: Deprecated option RSAAuthentication
/etc/ssh/sshd_config line **: Deprecated option RhostsAuthentication

「sshd インストール」とかでググると、2003年(マトリックス リローデッドが流行った頃!)に書かれた記事がトップに出てきて、その手順の中にRSAAuthentication noが書かれているのが、いまだに受け継がれているっぽい。

結論からいうと、これらの行はサクッと削除してOK。

OpenSSH 7.4で、SSH v1サポートが(実質的に)削除された

OpenSSHは、SSHの実装の一つで、現代のほとんどのlinuxディストリビューションで採用されているデファクトスタンダード。2016年に発表されたOpenSSH 7.4のリリースノートでは、こんなふうに書かれている。

 In approximately August 2017, removing remaining support for the SSH v.1 protocol (client-only and currently compile-time disabled).
(私訳)2017年夏頃をもって、残っているssh v.1プロトコルのサポートを削除する予定です(現在は、クライアント側にのみ実装が残っていて、通常のコンパイルでは無効に設定されています)
This release removes server support for the SSH v.1 protocol.
(私訳)サーバサイドのSSH v.1サポートはこのリリースで削除されました。

ssh v.1は2001年ごろから脆弱性が指摘されていて、その後v.2に移行が進んだ。
上記の通りv.1のサポートは終了したし、もっと前から意図して使うようにしない限り使えないように設定されていたから、yumとかapt-getでバイナリをインストールして使っているだけの人は、v.2を使っていると思って間違いない。

SSH v1向けのオプション

例えばFreeBSD Manual Pagesに記述が残っている(公式のmanだと、もう廃止されているので載っていない)のだけど、RSAAuthenticationオプションは、"This option applies to protocol version 1 only." となっている。

RSAAuthentication
  Specifies whether pure RSA authentication is allowed.
The default is ``yes''. This option applies to protocol version 1 only.

同様にRhostsAuthenticationについても、docs.oracle.comあたりを見ると、

RhostsAuthentication
  Specifies whether authentication using rhosts or /etc/hosts.equiv files is sufficient. Normally, this method should not be permitted because it is insecure. RhostsRSAAuthentication should be used instead, because it performs RSA-based host authentication in addition to normal rhosts or /etc/hosts.equiv authentication. The default is no. Note that this parameter applies only to protocol version 1.

ということで、これもSSHv1向けのオプションだったということがわかる。

以上。SSHv1をサポートしない最新のopensshにおいて、RSAAuthentication,RhostsAuthenticationの設定を記述する必要はもうない。

33
21
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
33
21