Logons take over 2 minutes

I have a RHEL 7.9 server running as a virtual machine within a VMware ESXi 6.7 host.

When I Putty/SSH over to this RHEL-7.9 machine there is slowness:

  1. most of the time I get a logon prompt immediately, sometimes not,
  2. after providing my login I sit and wait for at least another 60 seconds before I ever see a Password prompt, then immediately I am logged in.

How do I troubleshoot this with strace? When I tail the /var/log/secure or /var/log/messages file I do not see any delays in the logs updating.

Thanks in advance.

It turns out this was not a necessary post.

My coworker had updated /etc/ssh/sshd_config with the following configuration:
#UseDNS yes

He did not realize that if the directive is hashed out the default is still set to “Yes” which has the same result as the syntax above.

I went back to /etc/ssh/sshd_config and set the line to:
UseDNS no explicitly.

However, that indicates that the check that the resolved host name for the remote IP address maps back to the very same IP address has issues, i.e. the name resolution has issues. That could affect other activity too.

1 Like