We had a RHEL server running well for almost two months and then, suddenly after a power outage, we cannot ssh in. Of course, the power is back, and we can log in locally, however, we keep getting a "Connection refused" message when trying to ssh in. Note, we typically log in via password, not via keys.
Here is what we've tried:
- restarting the ssh service (didn't work)
- restarting the machine (didn't work)
- deleting known hosts (in case something got corrupted) (didn't work)
- deleting all retained keys (in case something got corrupted) (didn't work)
- passing in password via command line
here are the outputs we keep getting:
$ ssh -vvv saif@XYZ.ddns.net
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to XYZ.ddns.net [220.127.116.11] port 22.
debug1: connect to address 18.104.22.168 port 22: Connection refused
ssh: connect to host XYZ.ddns.net port 22: Connection refused
Why would ssh suddenly stop working? What can we do to get a better idea of what is failing?
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.