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

Conversation

Vicente-Cheng
Copy link
Collaborator

- We could do more when we want to introduce the customer setup

This commit will help us to config sftp dynamically.

    - We could do more when we want to introduce the customer setup

Signed-off-by: Vicente Cheng <[email protected]>
@@ -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"

Copy link

@masteryyh masteryyh left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

Copy link
Member

@bk201 bk201 left a comment

Choose a reason for hiding this comment

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

lgtm!

@bk201 bk201 merged commit 06013df into harvester:sle-micro Sep 5, 2023
@bk201
Copy link
Member

bk201 commented Sep 5, 2023

@Mergifyio backport harvester-v1.2.x

@mergify
Copy link

mergify bot commented Sep 5, 2023

backport harvester-v1.2.x

✅ Backports have been created

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.

3 participants