美文网首页
xshell无法连接虚拟机

xshell无法连接虚拟机

作者: Zero_0_0 | 来源:发表于2019-04-23 00:32 被阅读0次

    注:可能是自己没安装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连接了 
    如果还是没有成功,考虑时候是防火墙的原因
    
    

    相关文章

      网友评论

          本文标题:xshell无法连接虚拟机

          本文链接:https://www.haomeiwen.com/subject/agopgqtx.html