Skip to content

Commit

Permalink
Revert "replace tf specific sshd configuration by a separate file tha…
Browse files Browse the repository at this point in the history
…t is included in sshd_config"

This reverts commit 641d171.
  • Loading branch information
mboisson committed Jan 22, 2025
1 parent d5ec40a commit 32efbd0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions common/configuration/puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runcmd:
- chmod 755 /etc # avoid issue with Rocky 9.4
- test ! -d /${sudoer_username} && userdel -f -r ${sudoer_username} && cloud-init clean -r
- restorecon -R /${sudoer_username}
- echo -e "Include /etc/ssh/sshd_config.d/50-authenticationmethods.conf" >> /etc/ssh/sshd_config
- echo -e "match User tf\n\tAuthorizedKeysFile /etc/ssh/authorized_keys.%u\n\tAuthenticationMethods publickey" >> /etc/ssh/sshd_config
- sed -i '/HostKey \/etc\/ssh\/ssh_host_ecdsa_key/ s/^#*/#/' /etc/ssh/sshd_config
- chmod 644 /etc/ssh/ssh_host_*_key.pub
- chgrp ssh_keys /etc/ssh/ssh_host_*_key.pub
Expand Down Expand Up @@ -134,12 +134,6 @@ write_files:
- content: restrict%{ if contains(tags, "puppet") },pty%{ else }%{ for host, ip in puppetservers },permitopen="${ip}:22"%{ endfor },port-forwarding,command="/sbin/nologin"%{ endif } ${tf_ssh_public_key}
path: /etc/ssh/authorized_keys.tf
permissions: "0644"
- content: |
Match User tf
AuthorizedKeysFile /etc/ssh/authorized_keys.%u
AuthenticationMethods publickey
path: /etc/ssh/sshd_config.d/50-authenticationmethods.conf
permissions: "0600"
- content: |
facts : {
blocklist : [
Expand Down

0 comments on commit 32efbd0

Please sign in to comment.