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

Document SSH key and password authentication #80

Merged
merged 2 commits into from
Jun 16, 2020
Merged

Document SSH key and password authentication #80

merged 2 commits into from
Jun 16, 2020

Conversation

bgilbert
Copy link
Contributor

@bgilbert bgilbert commented Jun 4, 2020

Hold until Fedora 32 reaches FCOS stable.

Fixes coreos/fedora-coreos-tracker#138.

@dustymabe
Copy link
Member

dustymabe commented Jun 4, 2020

This looks great!

Any chance you could throw in an example of how to create a hashed password and an FCC that uses it? I know when I come to look at this documentation those two pieces of info (along with the SSH password auth enablement bit) are going to be exactly what I'm looking for to try to reproduce a problem and having them together is going to make my life way easier.

inline: |
# Fedora CoreOS disables SSH password login by default.
# Enable it.
# This file must sort before 04-disable-passwords.conf.
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if since SSHD uses a "first one wins" strategy for config merging we should make the files we write easier to override by putting them at a higher number. i.e., 80-disable-passwords.conf

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can't. The Fedora package ships an 05-redhat.conf that includes PasswordAuthentication yes.

Copy link
Member

Choose a reason for hiding this comment

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

ahh - grr. I guess my same question would apply to the rpm maintainers. Started a discussion there: https://src.fedoraproject.org/rpms/openssh/pull-request/9

@bgilbert bgilbert changed the title Document enabling SSH password authentication Document SSH key and password authentication Jun 4, 2020
@bgilbert
Copy link
Contributor Author

bgilbert commented Jun 4, 2020

Updated!

Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

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

This looks really great @bgilbert. Thanks for incorporating the suggestion to include an fcct snippet and also instructions on how to properly generate a hashed password. It makes this documentation so much better!

@dustymabe dustymabe marked this pull request as draft June 4, 2020 16:08
@dustymabe
Copy link
Member

This is ready for merge, but I'm converting to draft so no one merges yet as recommended in #80 (comment)

@dustymabe
Copy link
Member

Should we link to this new documentation from the "By default, FCOS does not allow password logins via SSH. We recommend configuring SSH keys instead." in https://docs.fedoraproject.org/en-US/fedora-coreos/migrate-cl/#_configuration_changes ?

@bgilbert
Copy link
Contributor Author

bgilbert commented Jun 4, 2020

Done!

@bgilbert
Copy link
Contributor Author

Hold for sshd packaging changes.

@bgilbert
Copy link
Contributor Author

Added a separate commit to renumber the sshd_config.d fragment more sensibly after coreos/fedora-coreos-config#480 lands, but that PR is blocked on coreos/fedora-coreos-tracker#540. Do we want to land the rest of this now, or wait until we can document a long-term stable filename?

@dustymabe
Copy link
Member

Do we want to land the rest of this now, or wait until we can document a long-term stable filename?

IIUC if someone implements 02-enable-passwords.conf file now, things will still work even after the priority number of the other files are changed (in sshd and fcos configs). I think we can land the rest of it now.

@bgilbert bgilbert marked this pull request as ready for review June 16, 2020 18:32
@bgilbert bgilbert merged commit f002f92 into coreos:master Jun 16, 2020
@bgilbert bgilbert deleted the pw branch June 16, 2020 18:32
@bgilbert
Copy link
Contributor Author

OK, moved that part to #85.

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.

Consider disabling SSH password login by default
3 participants