在虚机中安装了ubuntu,但是从宿主机器上ping 22的端口始终不通,查询原因,虚机只安装了 openssh-client.

      运行Terminal 

         $-> sudo apt-get install openssh-server

            错误信息  

        

           解决方法:

                     https://askubuntu.com/questions/546983/ssh-installation-errors

                 

        执行命令: 

$-> sudo aptitude install openssh-client=1:6.6p1-2ubuntu1

     错误提示:  This Command is not found!

          于是开始安装 aptitude 

 $-> sudo apt-get install aptitude   #aptitude 可以按照版本依赖进行 应用安装

   错误提示:

                  https://ubuntuforums.org/showthread.php?t=1081227

                 

          解决方法:

                https://askubuntu.com/questions/316102/no-installation-candidate-when-trying-to-install-build-essential

                 

                 

                再执行上面的 命令成功了!

               xshell 效果: