I upgraded a host system to 14.3 and it completed fine. No problems whatsoever. Well, other than it was a remote system and immediately following the second freebsd-update install the ssh session dropped and could not be re-established. Running ssh -vv revealed this:
So the issue is sntrup761x25519-sha512. Given that the TCP connection succeeded and that the sshd daemon is obviously running on the upgraded host I tried this:
which worked.
This takes a lot less time to write in the morning after the fact than it did to experience finding out the facts late at night. What is going on? Is this a bug in sshd? Why did not the key exchange fallback on the remaining keys types rather than the server simply dropping the connection? This is a booby trap for people that have to maintain remote server hosts.
I would rather avoid having to configure .ssh/config for each of the hosts I plan to upgrade, but remembering to add
Code:
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c,kex-strict-c-v00@openssh.com debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp256,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,. . .
. . .
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,. . .
. . .
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: sntrup761x25519-sha512@openssh.com
debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY Connection closed by 192.168.216.45 port 22
So the issue is sntrup761x25519-sha512. Given that the TCP connection succeeded and that the sshd daemon is obviously running on the upgraded host I tried this:
Code:
ssh -vv -oKexAlgorithms=curve25519-sha256 192.168.216.45
This takes a lot less time to write in the morning after the fact than it did to experience finding out the facts late at night. What is going on? Is this a bug in sshd? Why did not the key exchange fallback on the remaining keys types rather than the server simply dropping the connection? This is a booby trap for people that have to maintain remote server hosts.
I would rather avoid having to configure .ssh/config for each of the hosts I plan to upgrade, but remembering to add
-oKexAlgorithms=curve25519-sha256
to ssh whenever I connect to a 14.3 host is a PITA and should not be necessary.