Something was amiss with our ThinLinc server and I had problems connection, getting this in the log:
> 2021-12-23T15:40:54: SSH command: /opt/thinlinc/lib/tlclient/ssh -N -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o UpdateHostKeys=yes -o PubkeyAuthentication=no -o CheckHostIP=no -o NumberOfPasswordPrompts=1 -o HostKeyAlgorithms=ssh-rsa,ecdsa-sha2-nistp256 email@example.com -p 22 -L 35451:127.0.0.1:5914 -R 5045:127.0.0.1:48135 -R 5046:127.0.0.1:43777 -R 5044:127.0.0.1:37063 -R 5043:127.0.0.1:43121 thinlinc-login dummy
> 2021-12-23T15:40:54: SSH pid is 2352355
> 2021-12-23T15:40:54: ssh[E]: kex_exchange_identification: read: Connection reset by peer
> 2021-12-23T15:40:54: ssh[E]: SYSTEM ERROR: 104
This is a network error, so we should report it as such to the user. But instead I got "Internal error in SSH.", which was unexpected.
Looking at the code we except network errors in this stage to report "CONNECT ERROR", not "SYSTEM ERROR". However this code is from 2009, so things might have changed in OpenSSH and that assumption is no longer correct.
(or it might have always been wrong and we never caught this particular case before)
I have no idea what was wrong with the server, so I don't know how to properly reproduce this unfortunately.