fixed and reordered commands

This commit is contained in:
2024-03-13 14:05:02 -05:00
parent 7b4f0d0853
commit d8b5ad72ed

View File

@@ -45,12 +45,6 @@ fi
# remove all motd
rm /etc/motd > /dev/null 2>&1
# enable and start sshd
if [[ ! -d /etc/ssh ]]; then
rc-update add sshd
rc-service sshd start
fi
# add ssh keys for akanealw
if [[ -d /home/akanealw ]]; then
mkdir /home/akanealw/.ssh > /dev/null 2>&1
@@ -72,3 +66,9 @@ fi
# disable ssh password login
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
sed -i "/#PasswordAuthentication yes/c\PasswordAuthentication no" /etc/ssh/sshd_config
# enable and start sshd
if [[ -f /etc/init.d/sshd ]]; then
rc-update add sshd
rc-service sshd start
fi