2022-02-05 14:23:32 +00:00
|
|
|
STATE=$(get_setting ssh.enabled)
|
|
|
|
SVC="sshd"
|
|
|
|
CONF="sshd.conf"
|
|
|
|
DAEMONS=("sshd")
|
2023-04-01 00:20:39 +00:00
|
|
|
|
|
|
|
# Prepare authorized keys if they exist
|
|
|
|
if [ ! -e "/storage/.ssh/authorized_keys" ] && \
|
|
|
|
[ -e "/usr/config/ssh/authorized_keys" ]
|
|
|
|
then
|
|
|
|
mkdir -p /storage/.ssh/
|
|
|
|
cp /usr/config/ssh/authorized_keys /storage/.ssh/authorized_keys
|
|
|
|
chmod 0610 /storage/.ssh/authorized_keys
|
|
|
|
fi
|