add support for configuring root authorized_keys file
This commit is contained in:
8
start.sh
8
start.sh
@@ -2,6 +2,12 @@
|
||||
|
||||
mkdir -p /run/sshd
|
||||
|
||||
chown root: /root/.ssh/authorized_keys
|
||||
if [ -n "$ROOT_AUTHORIZED_KEYS" ]; then
|
||||
if [ -f "$ROOT_AUTHORIZED_KEYS" ]; then
|
||||
mkdir -p /root/.ssh
|
||||
cp "$ROOT_AUTHORIZED_KEYS" /root/.ssh/authorized_keys
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
fi
|
||||
fi
|
||||
|
||||
exec /usr/sbin/sshd -D -e
|
||||
|
Reference in New Issue
Block a user