Skip to content
Snippets Groups Projects
Commit 0066d594 authored by Adam Wujek's avatar Adam Wujek
Browse files

[FEATURE: #348] rootfs/etc/ssh/sshd_config: read authorized_keys also from /update/permanent/ssh/


Signed-off-by: default avatarAdam Wujek <dev_public@wujek.eu>
parent 3b5f71a5
Branches
Tags
No related merge requests found
......@@ -30,10 +30,13 @@ start() {
echo "$0 unable to source dot-config ($dotconfig)!"
fi
echo "# Key in this file will be lost at restart!" > /root/.ssh/authorized_keys
echo "# Consider storing keys in the permanent location: $permanent_path_ssh/authorized_keys" >> /root/.ssh/authorized_keys
# copy authorized keys if exists
if [ -f /usr/authorized_keys ] ; then
mkdir -p /root/.ssh/
cp /usr/authorized_keys /root/.ssh/
cat /usr/authorized_keys >> /root/.ssh/authorized_keys
fi
# Make sure ssh directory exists
......
......@@ -51,8 +51,10 @@ PermitRootLogin yes
#PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
# Files /update/permanent/ssh/authorized_keys.%u are per user (%u) and survive
# WRS firmware updates. .ssh/authorized_keys can be used if provided in
# /usr/authorized_keys of WRS firmware.
AuthorizedKeysFile /update/permanent/ssh/authorized_keys.%u .ssh/authorized_keys
#AuthorizedPrincipalsFile none
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment