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.

when I am trying to access the server through ssh it says:

ssh: connect to host xx.yyy.zzz.x port 22: Connection refused

and on the server in auth.log it shows following log entry:

Address xx.yyy.zzz.x maps to xx.yyy.zzz.x.static-pune-vsnl.net.in, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

I have created a user account for that user and it is also in enabled status.

Requested info

  1. It is Ubuntu 11.10
  2. It is configured as SSH Server using openssh-server
  3. I am trying to connect to this server using Putty from Windows 7 i.e. My Desktop
  4. I have also asked this on AskUbuntu: http://askubuntu.com/questions/118556/unable-to-access-the-server-via-ssh
share|improve this question
    
@Oliver Salzburg Thanks a lot!! :) –  Rishee Apr 3 '12 at 15:33
    
Only ask this question once please. Delete it on one site – cross posting is not allowed. –  slhck Apr 3 '12 at 16:20

3 Answers 3

Your ISP has screwed up its DNS setup. You will need to set the UseDNS option in the sshd configuration file to no.

share|improve this answer
    
Thanks buddy it may be silly question but please let me know how to do it? –  Rishee Apr 3 '12 at 15:40
    
I usually use a text editor. The file here is /etc/ssh/sshd_config, but I don't know where it is on Ubuntu. You may need to find another system to hop from though. Oh, and yell at your ISP. –  Ignacio Vazquez-Abrams Apr 3 '12 at 15:42
    
Will take a good case of our ISP for sure... but is there any way we can add or remove some entries in our own DNS Server (which is hosted by us), which may intern resolve this issue? –  Rishee Apr 3 '12 at 15:48
    
Basically, no. The problem is not with the server's DNS but with the DNS associated with where you're connecting from, which the ISP controls. Specifically, it looks like they have PTR records set up but no corresponding A records. You could fake the A record on the DNS your server uses for resolution, since you appear to be connecting from a static IP. –  Darael Apr 3 '12 at 16:31
up vote 3 down vote accepted

The server may enable UseDNS. Run man sshd_config to find information about this.

If you have the right permissions, you can modify /etc/ssh/sshd_config and add UseDNS no to this file.

share|improve this answer

The problem (at least as reported by the error log) is that your reverse IP lookup is not working properly. Reverse IP lookup means taking the IP address and looking it up in the DNS and finding the name (rather than the usual, finding an IP from a name).

The best thing to do in any case is to disable the DNS check by using the UseDNS no setting. This will also speed up your SSH logins, since no DNS will then be required upon login.

The settings file is sshd_config and is normally located in the directory /etc/ssh.

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.