Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ESCA key to login by --ssh argument #5100

Open
a2d8a4v opened this issue Mar 13, 2019 · 4 comments
Open

Using ESCA key to login by --ssh argument #5100

a2d8a4v opened this issue Mar 13, 2019 · 4 comments

Comments

@a2d8a4v
Copy link

a2d8a4v commented Mar 13, 2019

It seems that we can not use wp-cli to remote with ECSA key?

If we want to log in some instance like AWS ec2 or instance in Google Computer Engine, It is necessary to create a SSH key first. And then login by command like this:
ssh -i /path/to/key.pem user@ipaddress -p port

but a little pity about using --ssh on wp-cli is that, It seems like we cannot allocate the path to key file for login using.

@schlessera
Copy link
Member

Indeed, this is currently not possible. I looked into the before_ssh hook, but that is useless here, I don't see any way of injecting this additional argument with the current code.

However, you can provide per-host configuration of the identity file in your configuration file (usually ~/.ssh/config): https://man.openbsd.org/ssh_config.5#IdentityFile

@a2d8a4v
Copy link
Author

a2d8a4v commented Mar 13, 2019

I understood. So maybe It could be the one new function in one day? I think put setting in ~/.ssh/config is also a method to achieve this goal, but wp-cli could have this function itself it could be more great and convenient. Maybe add one more argument --ssh-key-path= or something else like it. I guess.

@schlessera
Copy link
Member

schlessera commented Mar 14, 2019

If we would add another argument, it would be more along the lines of --ssh-args=<additional-arguments> and accept any additional arguments to SSH.

@a2d8a4v
Copy link
Author

a2d8a4v commented Mar 16, 2019

Thank you very much! Hope the new function would come soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants