OpenSSH errors after updating, best way to fix?

This has been a nagging problem for a while, and I’d love to get it resolved.

I use Clear Linux on a headless Plex server. Last year sometime OpenSSH received an update, and after rebooting, I was attempting to log in via SSH on another computer.

I received this error upon attempting to log in:
kex_exchange_identification: read: Connection reset by peer
Connection reset by 10.0.1.24 port 22

Now the only way I am able to resolve this is to plug in a keyboard, blind log in and reboot the OpenSSH service.

I looked around to find some answers but nothing is really tailored for ClearLinux.

Any assistance would be greatly appreciated.

Did you:

sudo cp /usr/share/doc/openssh/sshd_config /etc/ssh/

And is it still default, as in unchanged…?

Hello, and thank you for the reply.

Yes, your command provided was completed and left untouched, but the issue persists.

Have you tried to launch openSSH in verbose mode?

ssh -vvv

Francesco

It might also be interesting if anything else had failed when your sshd is in that state.

As there is no “reboot” of a service, what do you actually do? Do you reboot the whole computer, do you restart the service (if how).

What modifications did you do to the system?

Did you look into journalctl if that shows you some info what might go on?

Does a: sudo swupd diagnose
say anything?

At some point it might also be good to connect a monitor to better troubleshoot.

Btw, the sshd_config file is very minimal, so unless you use AuthorizedKeysFile or sftp it should not matter much if it is there or not.

$ cat /usr/share/doc/openssh/sshd_config|grep -v ^#|grep -v ^$
AuthorizedKeysFile .ssh/authorized_keys
Subsystem sftp /usr/libexec/sftp-server

Thank you for this information. Apologies for the late reply, I was away.

I ran sudo swupd diagnose and a ton of files had mismatched hashes.
I repaired that successfully.

However, looking the journalctl showed me this error: fatal: /etc/ssh/sshd_config line 109: Subsystem ‘sftp’ already defined.

I loaded the sshd_config and commented it out, reboot, and now everything works smoothly again.

Thank you!

1 Like