XShell/Xftp 无法连接 Ubuntu20

环境

  • Ununtu:20
  • VMware Workstation:15.5

问题

  • 在虚拟机VMware下,Xshell/Xftp 模式连不上虚拟机

解决方案

  • ubuntu 初始安装,默认 ssh 只安装客户端(即只能 ssh 连接其他主机),没有安装服务端(即不能被其他主机ssh 连接本机),所以在此情况下,Xshell 连接虚拟机失败。

  • 需要操作:

    # 安装 ssh 服务端
    sudo apt-get install openssh-server 
    # 显示 sshd 即可以成功连接
    ps -e |grep ssh 
    # 如果不显示 sshd
    sudo /etc/init.d/ssh start 
    # 开启root权限
    sudo vim /etc/ssh/sshd_config
    # 增加一行
    #PermitRootLogin prohibit-password
    PermitRootLogin yes
    
    
posted @ 2020-07-14 10:49  久末丶  阅读(2122)  评论(0编辑  收藏  举报