-
Notifications
You must be signed in to change notification settings - Fork 150
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
Add optional alias parameter to host config #355
Conversation
|
Codecov Report
@@ Coverage Diff @@
## master #355 +/- ##
==========================================
+ Coverage 99.19% 99.50% +0.31%
==========================================
Files 18 18
Lines 1606 1613 +7
==========================================
+ Hits 1593 1605 +12
+ Misses 13 8 -5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Hi there, Thanks for the interest and the PR. This looks like useful functionality, and your code snippet above is a good first step for config parsing too. That one might be worth a separate PR if you're interested in making one. I left some comments on the code. |
Thank you! I'll make a seperate PR for parsing a ssh config file when this one gets pulled to master :) It would be useful indeed. I don't see any comments on the code, did you use the review function on github or what? |
Removed all the references to alias in parallel configs as per your review. It throws an error in the host config test but I think it's actually supposed to. Shouldn't clients that fail still return parameters like alias when I'm not entirely sure where in the code to fix this, maybe you can help me out here? :) Edit: |
this is useful for weird ssh proxies like cyberark PAM. Without this, it is difficult to identify the source of the output, as they all have the same hostname.
SyntaxError: non-default argument follows default argument
stupid mistake
Looks good, thank you again for the PR. Made a small change to docstrings and accepted types for |
Brilliant! I'll commit a ssh config parser in a new PR. Thank you for the pleasant collaboration 😁 |
* added optional alias parameter to single clients and HostConfig for configuration from parallel clients. This is useful for weird ssh proxies like cyberark PAM. Without this, it is difficult to identify the source of the output, as they all have the same host name. * Added tests. * Updated docstrings.
this is useful for weird ssh proxies like cyberark PAM. Without this, it is difficult to identify the source of the output, as they all have the same hostname.
As a side effect, this also adds part of the future ~/.ssh/config parsing, which would be nice (as per #103). the openssh config differentiates between host and hostname.
I wrote this code that implements simple ssh config parsing with unix-like pattern matching.