|
|
|
@ -16,6 +16,7 @@ rdnssd -u root -r /etc/resolv.conf
|
|
|
|
|
|
|
|
|
|
ssh_authorized_keys_path='/root/.ssh/authorized_keys'
|
|
|
|
|
ssh_config_path='/etc/ssh/ssh_config'
|
|
|
|
|
sshd_config_path='/etc/ssh/sshd_config'
|
|
|
|
|
# Initial Package Intallation
|
|
|
|
|
if [ [ $(get_distro) = "alpine" ]; then
|
|
|
|
|
apk update
|
|
|
|
@ -26,8 +27,8 @@ if [ [ $(get_distro) = "alpine" ]; then
|
|
|
|
|
echo "PasswordAuthentication no" >> $ssh_config_path
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if ! grep -q "PermitRootLogin yes" $ssh_config_path; then
|
|
|
|
|
echo "PermitRootLogin yes" >> $ssh_config_path
|
|
|
|
|
if ! grep -q "PermitRootLogin yes" $sshd_config_path; then
|
|
|
|
|
echo "PermitRootLogin yes" >> $sshd_config_path
|
|
|
|
|
fi
|
|
|
|
|
service sshd restart
|
|
|
|
|
else
|
|
|
|
|