浏览代码

Update LinuxInit.sh

MoeClub 4 年之前
父节点
当前提交
3698d167a9
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      LinuxInit.sh

+ 4 - 0
LinuxInit.sh

@@ -1,5 +1,9 @@
 #!/bin/bash
 
+# root
+sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
+sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
+
 # limits
 if [ -f /etc/security/limits.conf ]; then
   LIMIT='262144'