SSH Stopped working
12,549
Things to check on the remote machine (the machine you are connecting to):
- ssh server is running (which you've already done):
sudo service ssh status
- firewall isn't interfering:
sudo iptables -L
to check firewall rules - basic connectivity:
ping 192.168.0.90
(should get a response) - physical network issues (cable out, switch down, etc.)
- both computers are on the same subnet (192.168.0.). If you've reset the router, it could be granting IP addresses on a different subnet than your SSH server's static one.
Related videos on Youtube
Author by
kaleb
Updated on September 18, 2022Comments
-
kaleb over 1 year
I restarted my computer, and now I can't connect to it through ssh on my remote machine. I can connect to it through the host machine, but that's it. It says ssh is running, but I can't connect from another computer.
-
Aaron Hill over 10 yearsWhat happens when you try to ssh in from the remote computer?
-
kaleb over 10 yearsUsing putty it says: "Searching for host..." Then it says "Network error: Connection to myip has timed out"
-
kaleb over 10 yearsAlso my terminology might be a little off seeing that i am kind of new to this. By remote do you mean the computer i am trying to connect to. Or the computer i am connecting from?
-
douggro over 10 yearsDoes your network use DHCP for assigning IP addresses, and are you trying to connect using an IP address, as in
ssh [email protected]
? If so, rebooting the computer may have resulted in the IP address changing. You can get the IP address of the host through Network Manager on the host computer or throughifconfig
in Terminal. -
kaleb over 10 yearsMy ip adress is static so that could not have happened. I am connecting using ssh [email protected]. Im also pretty sure that my network uses DCHP. Also, thanks for the quick response :)
-
Admin about 2 yearsMake sure you don't have a VPN running on either PC. I had this problem when running a local network.
-
-
kaleb over 10 yearsAll of it was clear... It worked, but i still cant connect via another computer.
-
jhauris over 10 yearsdo you have denyhosts installed? Denyhosts is a really nice program that blocks IP addresses that have N failed authentication attempts. See denyhosts.sourceforge.net/faq.html#3_19 if that's the case.
-
kaleb over 10 yearsI have never installed anything like that.
-
jhauris over 10 yearsI would check anyway, it may have been pulled in by another package. Another thing to check is the /etc/ssh/sshd_config. There are options that would limit what addresses and ports that SSH listens to. Seems unlikely that would be changed, though.
-
kaleb over 10 yearswould you like me to post the config?
-
jhauris over 10 yearsThat might help. Can you also think of what you you might have changed on the system since this worked last?
-
kaleb over 10 yearsHere is the sshd config pastebin.com/9QCdZLcX0 Here is the ssh config pastebin.com/pMP8qHgA I did change the ip to a static one, but it has since been changed back due to this problem. Also before i reinstalled ssh, i had put SessionAliveInterval 60 into the ssh config. I dont think that it is there anymore though.
-
jhauris over 10 yearsfirst link says it's been removed.
-
douggro over 10 yearsHave you ruled out a problem with putty by using another Terminal client??