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

Validate SSH Config file for ProxyJump #195

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jharrington22
Copy link
Contributor

For ocm tunnel validate that the user has their SSH config setup to proxy devshift.org and openshiftapps.com domains to another host, eg. bastion.

Its a pretty simple validation as it only checks that your SSH config file contains these two domains it doesn't validate that the SSH config block is ProxyJump.

This is to help notify the user that their SSH config isn't setup correct and prevents long timeouts when you don't have it setup since you cannot SSH to rh-api.*(openshiftapps.com|devshift.org) domains without proxying through a bastion host.

@cben
Copy link
Contributor

cben commented Dec 16, 2020

Can you get somebody else from SRE to review? This command is effectively maintained by SREs anyway, and I think PRs will land faster and get better feedback if you cross-review...

Some thoughts from me, possibly silly:

  • On errors, consider printing an example of what the config should look like.
  • Is the needed config fixed? Could you use ssh -F configfile to make it Just Work instead of requiring user to config? 🤔
  • Could you avoid parsing ssh config and instead probe whether it's good by running some ssh commands?

But if you believe you need this logic (and want to maintain it 😛), looks reasonable.

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.

2 participants