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

oem: Include the sshd_config.d in default ssd config #78

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions files/system/oem/09_sshd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ stages:
X11Forwarding no
AllowTcpForwarding no
MaxAuthTries 3
Include /etc/ssh/sshd_config.d/*.conf
Copy link
Member

Choose a reason for hiding this comment

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

Will the daemon run if /etc/ssh/sshd_config.d/ doesn't exist or there are no files?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Seems OK

harvester-node-1:~ # ls /etc/ssh/
moduli      ssh_host_dsa_key      ssh_host_ecdsa_key      ssh_host_ed25519_key      ssh_host_rsa_key      sshd_config
ssh_config  ssh_host_dsa_key.pub  ssh_host_ecdsa_key.pub  ssh_host_ed25519_key.pub  ssh_host_rsa_key.pub

harvester-node-1:~ # tail -n5 /etc/ssh/sshd_config
AllowAgentForwarding no
X11Forwarding no
AllowTcpForwarding no
MaxAuthTries 3
Include /etc/ssh/sshd_config.d/*.conf

harvester-node-1:~ # systemctl restart sshd.service
harvester-node-1:~ # systemctl status sshd.service
● sshd.service - OpenSSH Daemon
     Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-09-05 06:13:20 UTC; 7s ago
    Process: 29188 ExecStartPre=/usr/sbin/sshd-gen-keys-start (code=exited, status=0/SUCCESS)
    Process: 29190 ExecStartPre=/usr/sbin/sshd -t $SSHD_OPTS (code=exited, status=0/SUCCESS)
   Main PID: 29191 (sshd)
      Tasks: 4
     CGroup: /system.slice/sshd.service
             ├─ 14746 "sshd: rancher [priv]"
             ├─ 14771 "sshd: rancher@pts/0" ""
             ├─ 14772 -bash
             └─ 29191 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"

EOF