Unable to access the server via SSH?
Solution 1
The server may enables UseDNS
.
man sshd_config
to find information about this.
If you have the right permission, you can modify /etc/ssh/sshd_config
and add UseDNS no
to this file.
Solution 2
It looks like your ISP has screwed up their DNS records. ssh appears to be complaining because when it looks up the IP address xx.yyy.zzz.x, it gets the name xx.yyy.zzz.x.static-pune-vsnl.net, but that name does not map back to the IP address, which often is an indicator that someone is trying to spoof their hostname. You should complain to your ISP to fix it, or change the setting fossilet mentioned. Such screwed up DNS records will also prevent you from connecting to most IRC servers.
Related videos on Youtube
Program man
It's my passion and job... So I have to work on all flavors of Linux. I am launching my own company very soon in the IT sector. Thank you all for giving support and to start such a good platform for all Linux users. Ubuntu rocks... :) Please feel free to contact me in case of any query on [email protected]
Updated on September 18, 2022Comments
-
Program man over 1 year
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
- It is Ubuntu 11.10
- It is configured as SSH Server using openssh-server
- I am trying to connect to this server using Putty from Windows 7 i.e. My Desktop
- I have also asked this in superuser as per the request of @zpletan and link to that question is given below.
https://superuser.com/questions/408080/unable-to-access-the-server-via-ssh
Thanks in advance.
-
brobrobrobrobro about 12 yearsMaybe it's a dumb question, but do you have the
openssh-server
package installed on your server? Is your server running Ubuntu? (If not, the proper place to ask this is probably superuser.com.) Is it a web server or an internal server? Have you tried deleting ~/.ssh on the computer you're connecting from? -
Program man about 12 years@zpletan Please check the updated quesion details. Thanks for your interest and have given you 1 up for the comment.
-
klox about 12 yearstray open your port 22 in your ufw ->
sudo ufw allow 22
orsudo ufw allow ssh
info -> help.ubuntu.com/community/UFW and try to connect again... -
Program man about 12 years@hhlp Thanks a lot buddy but still it is not working?? :(
-
Mantra about 12 years@zpletan If you tell users to ask somewhere else then please mention the process of migration or tell them not to cross post.
-
brobrobrobrobro about 12 years@slhck, I suggested SU as an alternative to this site if the server was not running Ubuntu, not as an additional place to ask the question. I was not expecting the cross-post. Also, I don't know how to migrate posts, and according to meta (meta.askubuntu.com/questions/1496/…) I'm not able to do so. If I knew how to migrate posts, I would have explained how.
-
brobrobrobrobro about 12 years@Rishee, cross-posting is a tricky thing, apparently. How about taking a look at meta.askubuntu.com/questions/1480/… and acting accordingly. If you decide to close one version of your question, I would probably close this one, as your problem seems to extend beyond Ubuntu.
-
Mantra about 12 years@zpletan Fair enough! It's just a reminder that if you do "community moderation", be familiar with the process and etiquette behind it, that is: not sending new users somewhere else without explaining the process. Just a reminder, no offense :) I'd also say this question should be closed here.
-
Ashimema about 12 yearsWhat address are you using to connect to the server.. an internal IP (i.e. like 192.168.0.2 or 10.0.0.2), the WAN IP of local network (and then using a router/firewall to route the request to the server) (i.e. 86.10.117.176 or similar) or a domain name (like myserver.no-ip.info)?
-
Program man about 12 years@zpletan Will try my level best to stick to those rules but some of those rules I quite really could not understand. So please feel free to correct and let me know. Thank you buddy! for letting me know about it. :)
-
Ashimema about 12 yearsThis should only be a problem if your routing the request through the outside world though right? If your on an LAN and connecting to using the LAN IP of the server, why would sshd check the reverse DNS entry?
-
psusi about 12 years@Ashimema, because it doesn't differentiate between the two; IP is IP, whether it is 3 feet away or the other side of the world. If this is supposed to be a local connection though, you have something messed up somewhere because it shouldn't see the connection coming from your public IP address.