Revision history for Rex-LibSSH

0.007     2026-12-01 19:28:30Z
  - The tests against a local sshd skip for a user whose login shell runs no
    commands (nologin, false): sshd runs every command through that shell
  - Rex::Interface::Fs::LibSSH::stat works on BSD targets (FreeBSD, macOS,
    OpenBSD): it asks GNU/BusyBox stat first and falls back to BSD stat
    (-f), with the same six fields, the mode including the setuid, setgid
    and sticky bits as on Linux. Rex's stat and mkdir and the mode and
    owner checks of file and mkdir stat through this backend, so they now
    work on existing files there too; before, they died with "Can't stat".
  - The tests check files they write themselves, also on systems without
    /etc/hostname such as FreeBSD. The new t/09-bsd-stat.t runs the live
    sshd with a BSD-style stat at the front of the login PATH.
  - Requires Net::LibSSH 0.006, whose error() is undef after a connect that
    worked.
  - Declares perl 5.14.4 as its minimum, which is what Rex requires, so CPAN
    testers on an older perl report NA rather than a failed dependency.

0.006     2026-11-26 04:10:20Z
  - Requires Net::LibSSH 0.005 and with it Alien::libssh 0.003, whose own
    libssh build is 0.12.2 with the upstream security fixes.

0.005     2026-10-21 19:27:03Z
  - A failed connect adds the "host key checking is on: add the host to
    known_hosts ... or opt out" hint only when the error is a host key
    refusal; a refused or unreachable port (a host still rebooting) carries
    no host key hint.
  - Rex::Interface::File::LibSSH reports failure. open returns false when
    the exec request fails or, reading, when cat exits non-zero, so a
    missing file does not read as an empty one; write dies on a failed
    write; close dies when the remote cat exited non-zero, so a write into
    a missing directory or onto a full disk is not reported as changed.
  - Rex::Interface::Fs::LibSSH::glob returns an empty list when a pattern
    matches nothing; file names are not split at whitespace and a blank in
    the pattern stays part of one word.

0.004     2026-09-20 18:54:48Z
  - SECURITY: the server host key is now verified against known_hosts by
    default (CWE-322, reported privately via CPANSec). Previously
    Rex::Interface::Connection::LibSSH hardcoded strict_hostkeycheck => 0
    and ignored the strict_hostkeycheck/knownhosts connect options, so the
    documented opt-in never did anything and any server -- including a
    man-in-the-middle -- was accepted. An unknown or changed key now fails
    the connection before authentication. Opt out per connection with
    strict_hostkeycheck => 0, or Rexfile-wide with
    -feature => ['disable_strict_host_key_checking'] (the same flag the
    OpenSSH backend honours); knownhosts => $file and
    Rex::Config->set_openssh_opt(UserKnownHostsFile => $file) select the
    file. Hosts that were never added to known_hosts (fresh Hetzner
    installs) must be ssh-keyscan'ed first or use the opt-out
  - Requires Net::LibSSH 0.004, whose connect() performs the check

0.003     2026-09-01 00:07:32Z
  - exec() now matches the 3-arg signature Rex::Commands::Run invokes
    ($cmd, $path, $option), so env hashes and shell options actually
    reach the SSH channel.
  - Reject paths containing NUL bytes in _q() and shell metacharacters
    in glob() patterns; the latter closes an injection vector through
    the remote shell expansion step that other paths avoid by being
    quoted.
  - Add t/04-no-sftp.t and t/lib/TestSSHDNoSFTP.pm to prove every
    Fs/File operation works against an sshd without a Subsystem sftp
    line — the environment this distribution was built for.
  - Document that Rex::Interface::Fs::LibSSH never routes through
    Rex::Interface::Fs::Sudo (known limitation, not a bug) and that
    upload/download/read-mode open hold the whole file in memory on both
    ends.

0.002     2026-03-29 04:09:31Z
  - Reset session timeout to 0 after connect to allow long-running commands

0.001     2026-03-29 02:55:49Z
  - Initial release
  - Rex::Interface::Connection::LibSSH — SSH connection via Net::LibSSH
  - Rex::Interface::Exec::LibSSH — command execution via SSH exec channels
  - Rex::Interface::Fs::LibSSH — filesystem operations without SFTP
  - Rex::Interface::File::LibSSH — file read/write via exec channels
