Skip to content

Commit a72a425

Browse files
committed
add support to sshd_config.d
<!--- Provide a general summary of your changes in the Title above --> [linuxserverurl]: https://linuxserver.io [![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl] <!--- Before submitting a pull request please check the following --> <!--- If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR --> <!--- Ask yourself if this modification is something the whole userbase will benefit from, if this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ --> <!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message --> <!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message --> <!--- We maintain a changelog of major revisions to the container at the end of readme-vars.yml in the root of this repository, please add your changes there if appropriate --> <!--- Coding guidelines: --> <!--- 1. Installed packages in the Dockerfiles should be in alphabetical order --> <!--- 2. Changes to Dockerfile should be replicated in Dockerfile.armhf and Dockerfile.aarch64 if applicable --> <!--- 3. Indentation style (tabs vs 4 spaces vs 1 space) should match the rest of the document --> <!--- 4. Readme is auto generated from readme-vars.yml, make your changes there --> ------------------------------ - [ ] I have read the [contributing](https://github.com/linuxserver/docker-openssh-server/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications ------------------------------ <!--- We welcome all PR’s though this doesn’t guarantee it will be accepted. --> ## Description: <!--- Describe your changes in detail --> ## Benefits of this PR and context: <!--- Please explain why we should accept this PR. If this fixes an outstanding bug, please reference the issue # --> ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Source / References: <!--- Please include any forum posts/github links relevant to the PR -->
1 parent 74ea2c9 commit a72a425

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • root/etc/s6-overlay/s6-rc.d/init-openssh-server-config

root/etc/s6-overlay/s6-rc.d/init-openssh-server-config/run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ echo "${USER_NAME}:${USER_PASSWORD}" | chpasswd
3333
# Migration
3434
if [[ -f /config/ssh_host_keys/sshd_config ]]; then
3535
mv /config/ssh_host_keys/sshd_config /config/sshd/sshd_config
36-
sed -i 's/Include \/etc\/ssh\/sshd_config.d\/\*.conf/#Include \/etc\/ssh\/sshd_config.d\/\*.conf/' /config/sshd/sshd_config
3736
echo "This file has been moved to /config/sshd/sshd_config" > /config/ssh_host_keys/sshd_config_README
3837
chmod 600 /config/ssh_host_keys/ssh_host_*_key
3938
chmod 644 /config/ssh_host_keys/ssh_host_*_key.pub
4039
fi
4140

4241
if [[ ! -f /config/sshd/sshd_config ]]; then
4342
sed -i '/#PidFile/c\PidFile \/config\/sshd.pid' /etc/ssh/sshd_config
44-
sed -i 's/Include \/etc\/ssh\/sshd_config.d\/\*.conf/#Include \/etc\/ssh\/sshd_config.d\/\*.conf/' /etc/ssh/sshd_config
4543
cp -a /etc/ssh/sshd_config /config/sshd/sshd_config
4644
fi
4745

46+
sed -i 's/Include \/etc\/ssh\/sshd_config.d\/\*.conf/Include \/config\/sshd\/sshd_config.d\/\*.conf/' /config/sshd/sshd_config
47+
4848
if [[ ! -d /config/ssh_host_keys ]]; then
4949
mkdir -p /config/ssh_host_keys
5050
ssh-keygen -A

0 commit comments

Comments
 (0)