Skip to content

Add ssh_config alias property to pass custom SSH config file via -F#6334

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/support-ssh-config-option
Draft

Add ssh_config alias property to pass custom SSH config file via -F#6334
Copilot wants to merge 2 commits into
mainfrom
copilot/support-ssh-config-option

Conversation

Copilot AI commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

WP-CLI had no way to specify a custom SSH config file when connecting to remote servers, blocking use cases like Lima (Linux on macOS) where connections require ssh -F config_file host_alias.

Changes

  • php/WP_CLI/Runner.php: In generate_ssh_command, reads ssh_config from the alias config and prepends -F <path> to the SSH command args. Also adds ssh_config to the connection-specific keys skip list so it is not forwarded to the remote WP-CLI instance.
  • features/aliases.feature: Adds a Behat scenario verifying -F appears in the generated SSH command when ssh_config is set.

Usage

# wp-cli.yml
@lima:
  ssh: user@lima-instance:/path/to/wordpress
  ssh_config: ~/.lima/default/ssh.config

Generates: ssh -F '~/.lima/default/ssh.config' -T -q 'user@lima-instance' 'wp ...'

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for ssh -F another_ssh_config server-alias/path Add ssh_config alias property to pass custom SSH config file via -F Jun 11, 2026
Copilot AI requested a review from swissspidy June 11, 2026 11:30
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
php/WP_CLI/Runner.php 0.00% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

Support for ssh -F another_ssh_config server-alias/path

2 participants