以root权限执行 vi /etc/ssh/sshd_config 按i进入编辑模式将 #PermitRootLogin yes 这一行的“#”去掉,修改为: PermitRootLogin yes 重启ssh服务 # service sshd restart (root执行)