• src/syncterm/ssh.c

    From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Mar 9 07:21:10 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/062c3faba40c1a72664e80c3
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Call ssh_close() on failure after ssh_session is initialized

    Fixes assertion on failed connects.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Mar 15 01:06:04 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/a45466867429f3ad7043fb5e
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Add missing NULL checks on malloc() in ssh_connect()

    conn_api.rd_buf and conn_api.wr_buf were allocated with malloc() but
    never checked for failure. The I/O threads started immediately after
    would dereference the NULL pointers and crash. Other connection types (conn_pty.c, conn_conpty.c, modem.c, rlogin.c) already had these
    checks; ssh.c was an oversight.

    The error paths also free(pubkey), which is either a valid allocation
    from get_public_key() or the initial NULL — both safe for free().

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Mar 15 14:09:12 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/0d4a52ec4893ef1cb472f45f
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Add missing create_conn_buf() error checks in ssh.c

    Check return values and clean up on failure, matching the pattern
    used by all other connection providers (rlogin, telnet, modem, pty,
    conpty).

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Thu Apr 23 18:36:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/2b39083e8614601afbacc67c
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    SyncTERM: send TERM environment variable on SSH channel

    Add an SSH "env" request (RFC 4254 §6.4) alongside the existing pty-req
    TERM, so servers that read TERM from the environment (rather than from
    the pty allocation) pick up SyncTERM's emulation string.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sat Apr 25 04:38:42 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/16c431f72e34453704dcb004
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    syncterm: identify in SSH banner, add RSA-SHA2-512, timeout, cleanse

    Four small additions in ssh.c using DeuceSSH APIs we hadn't wired up:

    - build_ssh_software_version() derives an RFC 4253 software-version
    token from syncterm_version (e.g. "SyncTERM_1.9b") and registers it
    via dssh_transport_set_version() so server admins can identify
    SyncTERM in their logs. The build flavor (Debug suffix) is
    deliberately stripped because the version banner is sent before
    encryption is established.

    - dssh_register_rsa_sha2_512() rounds out the host-key set; we already
    advertised SHA-256. Costs nothing and lets us interoperate with
    servers that prefer or require the SHA-512 variant.

    - dssh_session_set_timeout(60000) caps the library's peer-response
    waits at 60s. The default is 75s; the tighter bound surfaces hung
    handshakes before users assume SyncTERM has frozen.

    - dssh_cleanse() wipes the local password buffer in ssh_connect()
    after the auth attempts finish and the kbd-interactive answer
    buffer in kbi_prompt_cb(). Prevents secrets from lingering in
    stack slots that the compiler might otherwise leave intact.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tue May 5 05:32:14 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/067482fe2025fe188e3832d1
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Don't open an SFTP channel if "SSH Public Key" is disabled

    I need to rename that option.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)