Skip to content

Conversation

NielsdeBlaauw
Copy link
Contributor

SSH has the capability to route traffic through a proxy. This is done using the -J xxx argument. The ProxyJump can be used for security purposes by limiting access to remote servers to specific IP addresses.

Previously it had to use wp-cli with a proxy in between. The only somewhat practical way was adding it to your personal ~/.ssh/config:

Host production
  HostName xxx.xxx.xxx.xxx
  ProxyCommand ssh -q -W %h:22 vagrant

But this is technical and has to be done on every single machine in a team of multiple contributors.

This PR adds an option proxyjump to the alias specification so the wp-cli.yml config file can specify a comon proxy for all traffic to go through.

The change also includes a fix for the key attribute. It was part of the options for vagrant but did not seem possible for regular SSH commands, even though is can be usefull.

@NielsdeBlaauw NielsdeBlaauw requested a review from a team as a code owner June 8, 2023 12:57
Co-authored-by: Niels de Blaauw <niels.de.blaauw@gmail.com>
@schlessera schlessera added this to the 2.9.0 milestone Jun 8, 2023
@Mike-Hermans
Copy link
Contributor

HI @schlessera, I've updated the tests so they work with the escaped shell args we use.

@swissspidy swissspidy merged commit b6ab667 into wp-cli:main Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants