先更新一下系统 apt update && apt upgrade -y 改为 root 密码登陆 echo root:密码 |chpasswd root sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config; sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config; system…