5

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: https://askubuntu.com/questions/118556/unable-to-access-the-server-via-ssh
1
  • Only ask this question once please. Delete it on one site – cross posting is not allowed.
    – slhck
    Apr 3, 2012 at 16:20

3 Answers 3

3

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

4
  • Thanks buddy it may be silly question but please let me know how to do it?
    – Hrish
    Apr 3, 2012 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. Apr 3, 2012 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?
    – Hrish
    Apr 3, 2012 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, 2012 at 16:31
3

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.

2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .