#啓動ssh服務 /etc/init.d/ssh start #查看SSH服務22端口是否開啓 netstat -antulp | grep ssh
緣由:通常是設置了禁止root遠程登陸。python
vim /etc/ssh/sshd_config
將下列配置shell
# Authentication: LoginGraceTime 120 PermitRootLogin prohibit-password StrictModes yes
修改成vim
# Authentication: LoginGraceTime 120 PermitRootLogin yes StrictModes yes
參考:https://blog.csdn.net/fanren224/article/details/70862346 服務器