We can fix this issue as mentioned below:
Step 1: Take /etc/ssh/sshd_config backup
cp -p /etc/ssh/sshd_config /etc/ssh/sshd_config.`date ‘+%m-%d-%Y_%H:%M:%S’`
Step 2: Edit /etc/ssh/sshd_config on sshd server
vi /etc/ssh/sshd_config
And add this DNS option to the file:
UseDNS no
(OR)
Sometimes adding the client’s net address to the server’s /etc/hosts can fix this issue which is an alternative method.