Skip to content

Migrate SSH connections to phpseclib 3 - #15

Merged
Jord-JD merged 1 commit into
masterfrom
agent/phpseclib3-host-verification
Jul 18, 2026
Merged

Jord-JD merged 1 commit into
masterfrom
agent/phpseclib3-host-verification

Conversation

@Jord-JD

@Jord-JD Jord-JD commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • migrate the runtime from phpseclib 2.x to the maintained 3.x line without raising PHP 7.2
  • add pre-authentication host-key pinning with standard OpenSSH SHA-256/MD5 fingerprints and raw host-key access
  • support passphrase-protected private key files and strings
  • use SFTP for uploads and downloads, rejecting remote symlinks during recursive downloads
  • expose command exit status, success, and timeout state while preserving raw/trimmed output APIs
  • apply configured timeouts to connection/authentication as well as later operations
  • validate hostnames, usernames, ports, timeouts, commands, paths, and key inputs explicitly
  • update the real OpenSSH integration matrix to PHP 7.2 and PHP 8.5 with plain keys, encrypted keys, passwords, host pinning, transfers, and command failures
  • document security usage, fingerprint formats, key passphrases, timeouts, SFTP safety, compatibility, and v5 migration

SemVer

This is prepared for v5.0.0 because the phpseclib runtime major changes, uploads move from SCP to SFTP, and all fingerprints are corrected to hash the complete SSH wire key.

Validation

  • composer.json parsed as valid JSON
  • git diff --check
  • GitHub Actions provisions a real local OpenSSH server and is the executable PHP/integration gate

@Jord-JD
Jord-JD merged commit 7b41bc4 into master Jul 18, 2026
2 checks passed
@Jord-JD
Jord-JD deleted the agent/phpseclib3-host-verification branch July 18, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant