注:可能是自己没安装ssh
服务
依次执行 亲测
输入命令"sudo passwd root" //设置root密码
输入命令"sudo apt -y install openssh-server" //安装ssh服务
注:没有vim的 "sudo apt-get install vim"
安装完毕,运行命令"sudo vim /etc/ssh/sshd_config"
******
找到"PermitRootLogin prohibit-password"
在他下面添加一行
"PermitRootLogin yes" //保存
*****
输入命令"sudo update-rc.d ssh defaults"开启ssh服务开机自启动
输入命令"sudo service sshd start"启动服务
输入命令"sudo service sshd status"查看服务运行状态
"active(running)"说明服务正常。
接下来就可以xshell连接了
如果还是没有成功,考虑时候是防火墙的原因
网友评论