|
@@ -8,6 +8,8 @@ echo "root:${PASS}" |chpasswd root
|
|
|
sed -i "s/^#\?Port.*/Port $PORT/g" /etc/ssh/sshd_config;
|
|
|
sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
|
|
|
sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
|
|
|
+[ -d /etc/ssh/sshd_config.d ] && rm -rf /etc/ssh/sshd_config.d/*
|
|
|
+[ -e /etc/init.d/sshd ] && /etc/init.d/sshd restart
|
|
|
|
|
|
[ -e /usr/share/zoneinfo/Asia/Shanghai ] && {
|
|
|
cp -rf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
|
@@ -22,6 +24,3 @@ for usr in `cat /etc/passwd |cut -d':' -f1,6`; do
|
|
|
rm -rf "$h" 2>/dev/null
|
|
|
}
|
|
|
done
|
|
|
-
|
|
|
-rc-service sshd restart
|
|
|
-
|