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

SSH: sss_ssh_knownhosts must ignore DNS errors #7670

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

Conversation

aplopez
Copy link
Contributor

@aplopez aplopez commented Oct 28, 2024

When the DNS cannot resolve the provided hostname, sss_ssh_knownhosts must not fail.

Instead it should try its best to find it. It will now try to find the host account in IPA using both the fqdn and serverHostName attributes (the latter contains the shortname); and using the name and nameAlias attributes when looking for the host in the cache.

However, the IP address is not (and must not be) stored in the cache or IPA entries, so this case will not work if the DNS fails to associate a hostname to the provided IP address. In such a situation, no key will be retrieved and provided to ssh.

Resolves: #7664

When the DNS cannot resolve the provided hostname, sss_ssh_knownhosts
must not fail.

Instead it should try its best to find it. It will now try to find
the host account in IPA using both the fqdn and serverHostName
attributes (the later contains the shortname); and using the name and
nameAlias when looking for the host in the cache.

However, the IP address is not (and must not be) stored in the cache
or IPA entries, so this case will not work if the DNS fails to associate
a hostname to the provided IP address. In such a situtation, not key
will be retrieved and provided to `ssh`.

Resolves: SSSD#7664
@aplopez aplopez marked this pull request as ready for review October 29, 2024 09:29
Copy link
Member

@pbrezina pbrezina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected. Ack.

Copy link

@danlavu danlavu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG2M

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.

sss_ssh_knownhosts fails on F41
4 participants