Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
i have 3 linux servers on same network, having ip/names
s1 192.168.10.3
s2 192.168.10.4
s3 192.168.10.7
when i try to ssh from s1 to s3 it take 30sec (delay) prompting for password, whereas when i ssh from s2 to s3 it response me within 5 sec.
this is happening from last 2 months.
i can ssh from s1 to s2 without any delay.
Any idea why it takes a lot of time when ssh from s1 to s3 ?
Two things to look at are the UseDNS setting in /etc/ssh/sshd_config. Also check if one server has IP v6 enabled.
Also look at any differences when logging in with "ssh -v" or even "ssh -vv" to increase the verbosity. Is one method being tried for one server but not the other.
Are these two servers on the LAN or across the internet?
Consider using public key authentication if SSH is exposed to the internet. You can protect the private keys (on the client) with a passphrase and then use:
eval $(ssh-agent)
ssh-add
to be able to log in to your servers, after entering the pass phrase once.
Two things to look at are the UseDNS setting in /etc/ssh/sshd_config...
To expand on this, if you find that DNS lookups are the cause of the slowdown, I'd recommend correcting your /etc/resolv.conf entries on the offending server (rather than turning off UseDNS).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.