Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a ubuntu 12.04 server that I could connect to fine using ssh over the internet. I installed the xubuntu desktop on it, didn't change any settings, then suddenly ssh stopped working.

I can connect locally using "ssh localhost"

I can't connect if I type "ssh (public ip address)"

I can connect using a different computer on the same local network like "ssh 192.168.2.5"

I double checked to make sure the ports are forwarded correctly, when I use a online port checking tool I can confirm that port 22 is open.

I confirmed that the firewall is off using "sudo ufw disable"

Any other ideas what it might be? Should I just reinstall ubuntu server or is there a obvious thing I'm missing? Any help appreciated or just send me in the right direction, I don't mind reading to figure it out but I don't know where to start, thanks!!!

share|improve this question
1  
Please try to run ssh server in debug mode, attempt a connection and edit your question to include the ssh servers debug output. Also, please add the output of the client when using the verbose output option. –  soulsource Jul 13 '13 at 12:31
add comment

1 Answer 1

This probably not a ssh config problem if it is working on your local network.

Are you sure ssh is not filtered by a local firewall when you do the check from the outside ? You can try: telnet portquiz.positon.org 22 to test that.

What error do you get? ssh timeout? If it is a timeout this is probably a firewall issue.

You can also check /var/log/auth.log on your ssh server.

Test a telnet yourserverpublicip 22 from outside, and check the output of netstat -anp or tcpdump -ni any port 22

One more idea: some local NAT firewalls do not support NAT loopback so that the connection from outside on your public ip will work, but not from inside your NATed network.

share|improve this answer
add comment

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.