• Bad server host key using ssh from Fedora 40

    From Nigel Reed@1:103/705 to GitLab issue in main/sbbs on Sat Oct 19 15:10:51 2024
    open https://gitlab.synchro.net/main/sbbs/-/issues/796

    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.

    [ssh.log](/uploads/a8797a0f596defea994a76f1c8836020/ssh.log)
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Sat Oct 19 15:16:21 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/796#note_5749

    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
    ```
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Sat Oct 19 15:25:06 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/796#note_5750

    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. It would be nice to get Synchronet's sshd to work with the default Fedora setup.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Sat Oct 19 15:26:13 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/796#note_5750

    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.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rick Parrish@1:103/705 to GitLab note in main/sbbs on Sun Oct 20 10:08:53 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/796#note_5760

    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.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)