How to disable CBC Mode Ciphers in RHEL 8 or Rocky Linux 8

This writeup is reference from The Geek Diary

Edit /etc/sysconfig/sshd and uncomment CRYPTO_POLICY line:

CRYPTO_POLICY=

Edit /etc/ssh/sshd_config file. Add Ciphers, MACs and KexAlgorithms have been added

KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com

After making changes to the configuration file, you may want to do a sanity check on the configuration file

# sshd -t

Restart sshd services

# systemctl restart sshd

To test if weak CBC Ciphers are enabled

$ ssh -vv -oCiphers=3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc [youruserid@IP of your Server]

You should receive a aimilar message message

Unable to negotiate with 172.21.33.13 port 22: no matching cipher found. Their offer: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr

References:

No matching repo to modify: PowerTools when using dnf install on Rocky Linux 8.5

I was trying to install hdf5 after enabling EPEL. Installing EPEL

% dnf install -y epel-release
% dnf config-manager --set-enabled PowerTools
Error: No matching repo to modify: PowerTools.

I’ve noticed this documentation from CentOS-8 Repoid, there are name changes from Yum_repo_file_and_repoid_changes from 8.3 onwards. The documents can be found at https://wiki.centos.org/Manuals/ReleaseNotes/CentOS8.2011#Yum_repo_file_and_repoid_changes

Repoid (8.2.2004 and before)Repoid (8.3.2011 and later)
BaseOSbaseos
AppStreamappstream
PowerToolspowertools
centosplusplus
HighAvailabilityha
base-debuginfodebuginfo
Develdevel
BaseOS-sourcebaseos-source
AppStream-sourceappstream-source
centosplus-sourceplus-source
base-debuginfodebuginfo
% dnf config-manager --set-enabled powertools