Bad server host key using ssh from Fedora 40
When I ssh to my BBS from a Fedora 40 system, I get "Bad server host key: Invalid key length".
I've attached the output of ssh -vvv and the user I'm connecting with doesn't have an ssh key.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Nigel Reed assigned to @Deuce
assigned to @Deuce
- Author Developer
This is my synchronet term log
Oct 19 17:14:49 bbs synchronet: term 0029 SSH [47.186.47.228] Connection accepted on 192.138.210.158 port 22 from port 39838 Oct 19 17:14:49 bbs synchronet: term 0029 SSH Cryptlib Session: 9722 created Oct 19 17:14:49 bbs synchronet: term 0029 SSH [47.186.47.228] Hostname: <no name> Oct 19 17:14:49 bbs synchronet: term 0029 SSH [47.186.47.228] Attaching to Node 2 Oct 19 17:14:49 bbs synchronet: term Node 2 constructor using socket 29 (settings=8212) Oct 19 17:14:49 bbs synchronet: term Node 2 temporary file directory: /sbbs/node2/temp/ Oct 19 17:14:49 bbs synchronet: term Node 2 passthru listen socket 38 opened Oct 19 17:14:49 bbs synchronet: term Node 2 passthru socket listening on port 38573 Oct 19 17:14:49 bbs synchronet: term Node 2 passthru connect socket 39 opened Oct 19 17:14:49 bbs synchronet: term Node 2 input thread started Oct 19 17:14:49 bbs synchronet: term Node 2 thread started Oct 19 17:14:49 bbs synchronet: term Node 2 output thread started Oct 19 17:14:49 bbs synchronet: term Node 2 outbuf highwater mark tuned to 1436 based on MSS Oct 19 17:14:49 bbs synchronet: term Node 2 JavaScript: Creating node runtime: 134217728 bytes Oct 19 17:14:49 bbs synchronet: term Node 2 17:14 Sat Oct 19 2024 Node 2 Oct 19 17:14:49 bbs synchronet: term Node 2 SSH <no name> [47.186.47.228] Oct 19 17:14:49 bbs synchronet: term Node 2 0029 SSH Setting attribute: SESSINFO_ACTIVE ==> /var/log/sbbs/term.sbbs.log <== Oct 19 17:14:52 bbs synchronet: term Node 2 0029 SSH dbg 'No data was read because the remote system closed the connection (recv() == 0)' (-41) setting session active Oct 19 17:14:52 bbs synchronet: term Node 2 0029 SSH [47.186.47.228] session establishment failed Oct 19 17:14:52 bbs synchronet: term Node 2 disconnecting client Oct 19 17:14:52 bbs synchronet: term Node 2 passthru socket disconnected
- Author Developer
After further investigation, there is an /etc/ssh/ssh_config.d/50-redhat.conf file that includes /etc/crypto-policies/back-ends/openssh.config which seems to override the default Ciphers, KexAlgorithms, PubkeyAcceptedAlgorithms and a few more.
Maybe it's "RequiredRSASize 2048" ?
It would be nice to get Synchronet's sshd to work with the default Fedora setup.
Edited by Nigel Reed Collapse replies - Developer
Maybe it's "RequiredRSASize 2048" ?
Appears to be the case. My system has a 1536 bit key, and vert has a 1024 bit key. I lowered RequiredRSASize 2048 to 1536 to match my system and now I can connect, but as expected vert still fails due to the smaller key size it uses.