fixed and reordered commands
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user