-
Notifications
You must be signed in to change notification settings - Fork 60
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
Consider disabling SSH password login by default #138
Comments
+1 for I added a comment to the sshd bugzilla to express our interest in the feature and to see how likely or unlikely that RFE is. |
Pending support in upstream sshd, we could emulate support for config fragments. Quick hack:
That appears to correctly update |
Discussed in today's meeting. It turns out that the upstream defaults are:
but Fedora changes the latter to There was previously a Fedora Change proposal to disable SSH root login (prior discussion, Change discussion, related bug). Discussion of that Change centered on the security value of disabling passwords only for root, the ability to SSH into the machine if no user account was created, and the ability to enroll an SSH key without a way to get into the machine. None of those issues apply here. No one in today's meeting indicated a preference for enabling password auth by default. Next steps:
I'll defer PRing the design doc for a bit to allow for discussion of implementation approaches. |
FYI: Fedora 31 change proposal to disable root password via SSH: https://fedoraproject.org/wiki/Changes/DisableRootPasswordLoginInSshd |
PR in coreos/fedora-coreos-config#96 to disable password auth. Without |
OpenSSH 8.2 will add an |
coreos/fedora-coreos-config#349 moved the relevant config to |
Ugh, we just upgraded our Fedora CoreOS image, and this was a rather unexpected surprise -- all of a sudden ssh and Cockpit stopped working completely. So how does one change this back in ignition? Thanks! |
@martinpitt We've been disabling password login for a long time now; the only recent change was what file we're doing it from. Had you customized your setup to re-enable it? |
@bgilbert : Right, we did, just the seddery to change it in sshd_config did not work any more. (Needed to change to rm the separate file instead). Nevertheless, changing this in ignition will be cleaner in the future. Thanks! |
Here's an FCC fragment:
|
Docs update in coreos/fedora-coreos-docs#80. |
Just to be clear, you aren't "upgrading" existing systems, but you updated your config and now launching new systems shows this problem? The reason I ask is I want to make sure that we don't break people's existing systems that are doing upgrades and I want to understand the problem space better. |
@dustymabe: Right, sorry for being unclear there -- it's not an |
Ignition configs allow setting user passwords. There are (at least) two orthogonal reasons to do this:
The first case is useful as a debugging mechanism. The second seems like a model we'd want to discourage. Currently, by default, enabling the first case implies enabling the second case.
Consider disabling SSH password auth by default:
It should be possible (and documented) to override these settings via an Ignition config. However,
sshd_config
currently doesn't support inclusion of config fragments. Thus we appear to have several suboptimal choices:Document re-enabling password auth by modifying the monolithic
sshd_config
with Ignition.PasswordAuthentication
andPermitRootLogin
directives fromsshd_config
(to prevent them from taking precedence) and document appending to the file.This will prevent future
sshd_config
updates from taking effect on affected machines.Carry a downstream patch to OpenSSH.
Build a bespoke mechanism for configuring password authentication, using e.g. a systemd
EnvironmentFile
and-o
options tosshd
. Automatically migrate this configuration to config fragments when that functionality becomes available.Leave SSH password auth enabled in the initial FCOS release. This probably precludes disabling it in the future.
The text was updated successfully, but these errors were encountered: