Create "/run/sshd/" directory in the init script

This commit is contained in:
Héctor Molinero Fernández
2022-01-16 01:34:25 +01:00
parent b593eb1385
commit a2a7ddc95f
2 changed files with 5 additions and 4 deletions

View File

@@ -76,6 +76,11 @@ if [ -z "${VGL_DISPLAY-}" ]; then
fi
fi
# Create privilege separation directory for SSH server if it does not exist
if [ ! -e /run/sshd/ ]; then
mkdir /run/sshd/
fi
# Generate SSH keys if they do not exist
if [ ! -f /etc/ssh/ssh_host_ed25519_key ]; then
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N '' >/dev/null

View File

@@ -1,8 +1,4 @@
#!/bin/sh
if [ ! -e /run/sshd/ ]; then
mkdir /run/sshd/
fi
exec 2>&1
exec /usr/sbin/sshd -D