0

I purchased a new Ubuntu server several months ago. It is connected to my router. I was able to set up port forwarding for port 22 with my ISP, and then SSH into the server using the internal IP from my Windows laptop using wireless with the same router. I was also able to set up a name for the server and connect it to the external IP address using the No-IP dynamic update service, and was able to access the server using SSH both inside my apartment and remotely.

Then for some reason this stopped working several weeks ago while I was away traveling, and I was no longer able to SSH into the server externally. Since I have been back home I am not able to SSH into it internally either. Nothing has really changed as far as I am aware. I've had several calls with the server manufacturer as well as my ISP, and after troubleshooting all the obvious candidates both sides claim that the issue is on the other end.

I have checked that the IP is correct, port forwarding is set correctly, I've rebooted everything, reinstalled openssh on the server, etc. I have also tried connecting to it from another internet provider. I still can't SSH into the server internally or externally. The server works completely fine, and I can ping it on my laptop, I just can't SSH into it.

edit: I'm using putty with windows for ssh and the error I get is "Network error: Connection timed out"

When I type "sudo systemctl status sshd.service" I get that the system is active (running).

When I type "ssh localhost" I get "WARNING REMOTE HOST IDENTIFICATION HAS CHANGED" and then an error about an offending ECDSA key. "ECDSA host key for local host has changed and you have requested strict checking. Host key verification failed."

edit2: I fixed previous issue with ssh-keygen -R localhost. Now I can ssh into localhost.

I think my question is a little different from this other one UFW Allows 22 for IPv4 and IPv6 but SSH Disconnects When Enabling I didn't realize why I wasn't able to connect to ssh and it happened to be that my firewall was enabled. It wasn't that enabling the firewall disconnects a functional ssh connection.

1 Answers1

0

I was able to solve the problem with: sudo ufw disable