Tuesday, November 3, 2009

slow/delay in ssh login at Solaris/Linux

well, you might have notice when you access some UNIX machine, you will see a bit delay in login process, it can hang for a while at different levels such as,

1. Before asking username/login prompt
2. After asking username/login prompt
3. After taking password.

interestingly on all three cases the culprit is your DNS/name-resolution service.

Solutions:

1. mostly probably your DNS is not accessible or unable to resolve remote host's hostname.

2. if DNS is working then your host file is the issue! it should be correctly written.

3. check your client/workstation hostname is resolvable at server.

3rd is really tricky as if /etc/ssh/sshd_config is configured to ask for reverse dns (rDNS) request server will try to resolve client/workstation's hostname at server, and if your DNS is not configured to resolve client-side machine hostname, you will get delay on login.

The easiest solution to all login delay would be editing /etc/ssh/sshd_config and disbaling "useDNS" parameter by setting it "useDNS no".

cheers

No comments: