linuxserver / docker-openssh-server

GNU General Public License v3.0
538 stars 183 forks source link

[BUG] `9.7_p1-r4-ls175` fails to start with `WARNING: UNPROTECTED PRIVATE KEY FILE!` #98

Open gchux opened 17 hours ago

gchux commented 17 hours ago

Is there an existing issue for this?

Current Behavior

9.7_p1-r4-ls175 fails to start with WARNING: UNPROTECTED PRIVATE KEY FILE!

Expected Behavior

9.7_p1-r4-ls174 is OK

Steps To Reproduce

  1. create an image using lscr.io/linuxserver/openssh-server:9.7_p1-r4-ls175
  2. create a container using the created image
  3. it will fail with: WARNING: UNPROTECTED PRIVATE KEY FILE! Permissions 0640 for '/etc/ssh/ssh_host_ed25519_key' are too open.

Environment

- OS: Ubuntu 22.04
- How docker service was installed: using Docker's provided install script

CPU architecture

x86-64

Docker creation

docker buildx build -f Dockerfile -t ssh-server .

Container logs

ssh-keygen: generating new host keys: RSA ECDSA ED25519 
SSH host public key(s): ...
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0640 for '/etc/ssh/ssh_host_rsa_key' are too open.
github-actions[bot] commented 17 hours ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.