允许root用户远程登录
- 修改 /etc/ssh/sshd_config
PermitRootLogin yes
允许无密码登录
- 修改 /etc/ssh/sshd_config
PermitEmptyPasswords yes
最后重启
- /etc/initd.d/sshd restart
报错
- 如果报 Permission denied (publickey,password) 错误,请按照如下方式解决
确认不是密码错误和sshd服务开启。
修改服务器的配置文件/etc/ssh/sshd_config
PermitRootLogin yes
PubkeyAuthentication no
PasswordAuthentication yes
保存后重启sshd服务即可
service sshd restart