I prefer to use the respective config files for services in order to configure them. An example here is ssh where if you configure for example Ciphers, KexAlgorithms, and MACs in the sshd_config it most likely won't take effect. RHEL8 has switched to system-wide crypto policies which also affect sshd.
To make sshd ignore the crypto policies, uncomment the 'CRYPO_POLICY=' line in /etc/sysconfig/sshd:
[archy@server ~]$ sudo sed -i 's/^#\ CRYPTO_POLICY=/CRYPTO_POLICY=/g' /etc/sysconfig/sshd
Restart sshd:
[archy@server ~]$ sudo systemctl restart sshd.service
Check with nmap to see if the settings have been applied:
[archy@server ~]$ nmap -sV -Pn -p 22 -open -script ssh2-enum-algos 127.0.0.1
Starting Nmap 7.80 ( https://nmap.org ) at 2021-01-26 19:40 CET
Nmap scan report for 127.0.0.1
Host is up (0.00096s latency).
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.0
(protocol 2.0)
| ssh2-enum-algos:
| kex_algorithms: (1)
| curve25519-sha256@libssh.org
| server_host_key_algorithms: (1)
| ssh-ed25519
| encryption_algorithms: (1)
| chacha20-poly1305@openssh.com
| mac_algorithms: (1)
| hmac-sha2-512-etm@openssh.com
| compression_algorithms: (2)
| none
|_ zlib@openssh.com
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 0.32 seconds
It looks like the settings regarding Ciphers, KexAlgorithms, and MACs have been applied.
Feel free to comment and / or suggest a topic.
Comments
Post a Comment