Revision history for Net-LibSSH

0.005     2026-11-26 04:01:17Z
  - Fix segfault when a thread is created while a session, channel or SFTP
    object is alive: the objects are no longer cloned into the new thread
    and are not usable there, so the parent's connection is freed only once
  - Add auth_none() for servers that admit a session without credentials
  - Add Channel request_pty() and request_shell() for an interactive
    shell, and read_timeout() to read from it with a timeout or without
    waiting: it returns data, '' on a timeout and undef at end of file,
    and croaks on a failed connection
  - option() accepts kex, hostkeys, ciphers_c_s, ciphers_s_c, hmac_c_s and
    hmac_s_c, so legacy algorithms can be enabled explicitly for old
    devices; unset, the proposal is libssh's default, as before. The "+",
    "-" and "^" prefixes on those values are libssh's and need libssh 0.11.0
    or later
  - Requires Alien::libssh 0.003: a libssh built from source is 0.12.2 with
    the upstream security fixes, and a system libssh counts from 0.9.0 on
  - exit_status() calls ssh_channel_get_exit_state() on libssh 0.11.0 and
    later, where ssh_channel_get_exit_status() is deprecated; older libssh
    keeps the old call. Answers are unchanged: -1 for a process that is
    still running or was killed by a signal

0.004     2026-09-20 18:38:02Z
  - SECURITY: connect() now verifies the server host key against known_hosts
    (CWE-322, reported privately via CPANSec). Previously
    strict_hostkeycheck was passed to libssh but ssh_session_is_known_server()
    was never consulted, so any server -- including a man-in-the-middle --
    was accepted silently. With the default strict_hostkeycheck => 1,
    connect() now returns 0 with error() naming the problem when the host key
    is unknown, changed, of a different type, or known_hosts cannot be read;
    the session is disconnected and stays spent. strict_hostkeycheck => 0
    disables the check entirely, as documented. Users who relied on the
    default and never populated known_hosts must add the host key (e.g. via
    ssh-keyscan) or set strict_hostkeycheck => 0 explicitly

0.003     2026-09-01 00:06:26Z
  - SFTP integration test now stats /etc/passwd instead of /etc/hostname, so
    it passes on FreeBSD smokers where /etc/hostname does not exist (GH #1)
  - connect() on a session that has already been disconnected now returns 0
    immediately, with error() saying the session was disconnected and cannot
    be reconnected — instead of waiting out the connection timeout for
    libssh's misleading "Timeout connecting to ..."; disconnect() on a
    session that was never connected still leaves it connectable
  - Channel methods (exec, read, write, send_eof, eof, exit_status) now
    croak instead of operating on a closed channel; close() stays idempotent
  - Fix segfault when a channel or SFTP session is used after the session
    variable it was opened on has been undef-ed or reassigned; the session
    now stays alive until the last object opened on it is gone
  - Fix segfault when a channel or SFTP session is used, or merely dropped,
    after disconnect(); ssh_disconnect() frees those objects inside libssh,
    so they are now invalidated instead of left dangling. Their methods
    croak with "session was disconnected", close() on such a channel stays a
    harmless no-op, and nothing is leaked on the way

0.002     2026-03-29 14:49:04Z
  - Refactor XS internals: replace sv_setref_pv/DESTROY with
    sv_magicext + MGVTBL (svt_free) for automatic GC-driven cleanup
  - Typemap INPUT now uses mg_findext with type-specific vtable pointer
    for strict type checking at the XS boundary
  - No user-visible behaviour change

0.001     2026-03-29 02:46:04Z
  - Initial release
  - Session: connect, auth_password, auth_publickey, auth_agent
  - Channel: exec, read, write, eof, exit_status
  - SFTP: stat (graceful undef when SFTP subsystem absent)
