-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Paramiko does not respect CanonicalizeHostname and related options #897
Comments
This is somewhat related to #896 as the 'canonical' and 'originalhost' Matches are very useful in combination with CanonicalizeHostnames |
Digging into this now, aiming to implement everything but I've never used this feature myself so it's amusing/frustrating trying to wrap my head around it, especially in tandem with the "options only get written once" behavior. For example, the below seems like it should be a standard-enough use of the feature where I want to refer to short names but have settings in the file aimed at their matching FQDNs:
My assumption was that
However, only the But this seems counterintuitive - is one simply disincentivized to ever use In the end of course, it's moot, I need to implement the OpenSSH behavior regardless - but I want to make sure I understand the actual use of the feature, or I'm likely to miss corner cases in my tests. |
The above definitely isn't biting just me, see eg this RedHat ticket. But again, it's moot, so, at least I confirmed I am not simply dumb/crazy. |
Some related refactorings (prior support for I may not get that all done today but if I don't, it'll get done late next week when I return from a (non-tech) conference. |
- Refactor DNS lookup related junk previously only relevant to %h - Refactor guts of lookup() so it can be done >1 time - Changelog/tests/implementation for canonicalization itself Closes #897
- Refactor DNS lookup related junk previously only relevant to %h - Refactor guts of lookup() so it can be done >1 time - Changelog/tests/implementation for canonicalization itself Closes #897
Pushed a WIP commit for this. (later edit: separated branches for this and #717 because it was annoying me.) |
- Refactor DNS lookup related junk previously only relevant to %h - Refactor guts of lookup() so it can be done >1 time - Changelog/tests/implementation for canonicalization itself Closes #897
- Refactor DNS lookup related junk previously only relevant to %h - Refactor guts of lookup() so it can be done >1 time - Changelog/tests/implementation for canonicalization itself Closes #897
- Refactor DNS lookup related junk previously only relevant to %h - Refactor guts of lookup() so it can be done >1 time - Changelog/tests/implementation for canonicalization itself Closes #897
This is done enough! What's obviously missing:
|
Also, when testing how this impacts This became even more obvious under canonicalization's triggering of a 2nd parse pass. It's now tested for and in the changelog as fixed. |
Hi, could you at least merge something like 1e50709 to avoid |
This seems like a separate concern, @totaam, especially given this ticket was closed as completed more than four years ago. Is this commit you reference part of another PR? If so, please comment on that PR to mark your interest in its being merged. If it's not part of another PR, please create a new ticket for the fix. Either an issue with this request, if you're not comfortable making the requested changes yourself; or, a PR with the implementation. |
This is a direct result of the code added in this issue.
|
Of course, my apologies, I didn't express myself well there. It would have been better had I said, "This seems like something best addressed in a separate issue/PR ..." Thanks for the new PR! |
Openssh 6.5 introduced the ability for clients to canonicalize ambiguous hostnames for matching in known_hosts and Host config blocks https://www.openssh.com/txt/release-6.5:
And related from https://www.openssh.com/txt/release-6.6:
Paramiko currently ignores this setting and uses the hostname as-is in all cases
The text was updated successfully, but these errors were encountered: