CentOS7 SSHデーモンのセキュリティ強化 – インフォサーカス・インコーポレイテッド – Info Circus, Inc. 2019
暗号化方式(Ciphers)
SSHのサーバ・クライアント間で通信する際の暗号化方式です。
鍵交換方式(KexAlgorithms)
暗号通信を始める前に、暗号化に使用する鍵をサーバ・クライアント間で共有するために使用するアルゴリズムです。
メッセージ認証符号(MACs)
サーバ・クライアント間でやりとりされる暗号化されたメッセージが改竄や破損していないか確認する際に使用するアルゴリズムです
OpenSSHの暗号化周りの設定について #SSH - Qiita 2020
Ciphers
sshdで弱い暗号方式を使用しないようにする。 - labunix's blog 2016
Disabling CBC Ciphers
FreeBSD 12.3
$ man sshd_config Ciphers ... The default is: chacha20-poly1305@openssh.com, aes128-ctr,aes192-ctr,aes256-ctr, aes128-gcm@openssh.com,aes256-gcm@openssh.com, aes128-cbc,aes192-cbc,aes256-cbc
sshd_config
... Ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
sshd 再起動
/etc/rc.d/sshd restart
確認
ssh -c aes256-cbc 127.0.0.1 Unable to negotiate with 127.0.0.1 port 22: no matching cipher found. Their offer: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
FreeBSD 13.0-RELEASE-p8
The default is: chacha20-poly1305@openssh.com, aes128-ctr,aes192-ctr,aes256-ctr, aes128-gcm@openssh.com,aes256-gcm@openssh.com
MACs
Disabling umac-64-etm@openssh.com,umac-64@openssh.com
FreeBSD 13.0-RELEASE-p8
The default is: umac-64-etm@openssh.com,umac-128-etm@openssh.com, hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com, hmac-sha1-etm@openssh.com, umac-64@openssh.com,umac-128@openssh.com, hmac-sha2-256,hmac-sha2-512,hmac-sha1
sshd_config
MACs umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1