Skip to content

Commit

Permalink
Disable SSH password logins by default
Browse files Browse the repository at this point in the history
  • Loading branch information
bgilbert committed May 21, 2019
1 parent 4a8e334 commit 34cf112
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fedora-coreos-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ postprocess:
set -xeuo pipefail
sed -i 's/^AuthorizedKeysFile[[:blank:]]/#&/' /etc/ssh/sshd_config
echo -e '\n# Read authorized_keys fragments written by Ignition and Afterburn\nAuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys.d/ignition .ssh/authorized_keys.d/afterburn' >> /etc/ssh/sshd_config
# Disable SSH password logins by default
# Move to overlay once sshd_config fragments are supported
# https://github.com/coreos/fedora-coreos-tracker/issues/138
- |
#!/usr/bin/env bash
set -xeuo pipefail
sed -Ei 's/^(PasswordAuthentication|PermitRootLogin)[[:blank:]]/#&/' /etc/ssh/sshd_config
echo -e '\n# Disable password logins by default\nPasswordAuthentication no\nPermitRootLogin prohibit-password' >> /etc/ssh/sshd_config
# This will be dropped once FCOS is out of preview.
# See also experimental.motd in overlay/.
# https://github.com/coreos/fedora-coreos-tracker/issues/164
Expand Down

0 comments on commit 34cf112

Please sign in to comment.