]> source.dussan.org Git - gitea.git/commit
Only offer hostcertificates if they exist (#15849) (#15853)
authorzeripath <art27@cantab.net>
Thu, 13 May 2021 15:12:41 +0000 (16:12 +0100)
committerGitHub <noreply@github.com>
Thu, 13 May 2021 15:12:41 +0000 (11:12 -0400)
commit1bf46836dafa2bf34e269381e9f4496f9f2464c6
tree1ca6df93240edf740f0424309fe4d7ca8cac849c
parent387a1bc47228c2f4f60f64a6aa852e2e1e14e44a
Only offer hostcertificates if they exist (#15849) (#15853)

Backport #15849

A common bug report is the otherwise harmless sshd logging:

```
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
```

This PR simply checks if these files exist before creation of sshd_config and if
they do not exist, doesn't add a reference to them.

Fix #14110 amongst others.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
docker/root/etc/s6/openssh/setup
docker/root/etc/templates/sshd_config