Information
The IgnoreRhosts parameter specifies thatrhosts andshosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication
Setting this parameter forces users to enter a password when authenticating with ssh.
Solution
Edit or create a file ending in *.conf in the /etc/ssh/sshd_config.d/ directory or the /etc/ssh/sshd_config file and set the IgnoreRhosts parameter as follows:
IgnoreRhosts yes
Run the following command to comment out any IgnoreRhosts parameter entries in files ending in *.conf in the /etc/ssh/sshd_config.d/ directory or the /etc/ssh/sshd_config file that include any setting other than yes
# grep -Pi '^h*IgnoreRhostsb' /etc/ssh/sshd_config /etc/ssh/sshd_config.d/*.conf | grep -Evi 'yes' | while read -r l_out; do sed -ri "/^s*IgnoreRhostss+/s/^/# /" "$(awk -F: '{print $1}' <<< $l_out)";done