文章摘要旧絮 GPT方法11234567891011sudo -i //切换到rootpasswd //设置密码sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;sudo service sshd restartreboot //重启服务器 方法21234567891011sudo -i //用root身份passwd //设置root密码vi /etc/ssh/sshd_config //修改配置文件PermitRootLogin yesPasswordAuthentication yesreboot //重启服务器