1 检查是否安装ssh-server 服务器
解决:(1)先检查确认有没有安装ssh-server服务,输入命令:ps –e|grep ssh
(2)没安装 执行命令 install openssh-server
(3) 启动 service sshd start
(4) xshell 输入账号登录
(5)如果登录root用户提示拒绝密码 用超级管理员身份登录,修改 vi /etc/ssh/sshd_config,
找到
# Authentication:
LoginGraceTime 120
PermitRootLogin prohibit-password
StrictModes yes
把其中的permitRootLogin 修改成:
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
保存退出后, 重启 ssh 再次连接,即可成功。
/etc/init.d/ssh restart