SSH connection refused following update

Hello,
I am getting a connection refused trying to ssh into the machine after the update.
Have restarted sshd numerous times per this thread, but no joy.

Is there anything else I can check?

New(ish) here. Please let me know if this should be posted elsewhere. Thanks.

This indicates the service is not running.

systemctl status sshd

A service can be started - then it runs until system restart - and will not start automagically.

A service which is enabled will resume operation after restart.

To make sshd resume operation

sudo systemctl enable sshd

To start the service in same command

sudo systemctl enable sshd --now
2 Likes

I moved this to a new topic as suggested as you may get better attention this way.

What you might need to do is flush the (bad) SSH keys.

Check e.g. cat ~/.ssh/known_hosts (don’t post those results here!) and see if you can spot and remove the “offending” keys; you could also mv (rename) the file and generate new keys as needed.

It’s been a while since I’ve needed to do this but worth a try, if my memory serves me correctly.

1 Like

Hi there,
Many thanks! Backed up then cleared known_hosts, and it’s working.

Thanks again.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.