SSH gets hung
Sometimes in one of our server the ssh gets hung for one particular id alone and if we remove out the /tmp/ssh- directory it is again working fine. Any possible reasons and solutions for this.
Responses
Normally, ssh users keys and login environment details gets stored under .ssh directory inside users home. So, what is there within /tmp/ssh directory? Is this directory getting created automatically upon user ssh login?
Are you using hostname or IP address to login? If login using ip address works faster than hostname then it could be due to "UseDNS" inside sshd.conf file which you can set it to "no", restart sshd service and test the connectivity. This may prompt for confirmation while logging in since there is change in key fingerprint, after successful login those details would get added to ~./.ssh/known_hosts file.
But it is better to initially run the ssh command in verbose mode to see where exactly it is getting delayed, using the syntax format as : ssh -vvv @
Also, let us know what version of RHEL is this? It is good if you could also get this command output run on server:
egrep -v "^$|^#" /etc/ssh/sshd_config
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
