Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Whenever I login to a certain server using SSH I get a very long delay before a prompt appears. Everything I looked up on this issue says that it's a DNS issue and that I should disable reverse DNS lookups on the server.

But, the remote server is a shared webhosting server. I e-mailed the sysadmins but they say they have no DNS issue and that they won't change the server configuration. So, how can I fix this issue from my side (client side)? I have a static IP address and a hostname that points to it.

share|improve this question

2 Answers 2

You can't - you can't disable the DNS lookup from the client side alone.

share|improve this answer
    
I know. But what can I do to make the DNS lookup succeed instead? That should eliminate the delay as well. Like I said, I have a static IP and a valid hostname on the client side. –  Sander Marechal Mar 11 '11 at 16:36
    
You will need to set up both forward hostname->ip and reverse (ip->hostname) lookups for your IP and hostname, usually people pay no attention to the latter, which is usually where the delay related problems originate. –  cbz Mar 11 '11 at 17:23
    
@cbz: Theoretically, the lookup should succeed instantly even if it results in a NXDOMAIN rather than a name/address; if it times out, you have a different problem. –  grawity Mar 11 '11 at 19:39
    
I'm not sure that's entirely correct - it won't cache NXDOMAIN results - so will do a hierarchical search each time if it never finds a valid response. –  cbz Mar 11 '11 at 20:43
    
My hostname is 525fdd52.xs4all.nl and both forward and reverse IP work (I think, please check). So, how do I tell the remote sshd server my hostname? Is that in the ssh pubkey? –  Sander Marechal Mar 11 '11 at 21:28
up vote 0 down vote accepted

Apparently the issue is with the remote server's DNS settings. Because it's a shared server, looking up the IP address of the server does not result in the correct hostname. Adding the address of the server to my local /etc/hosts fixed the issue.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.