Windows10下Xshell6如何远程连接Ubuntu14.04

2021-02-06 22:16

阅读:780

  • Ubuntu安装openssh-server。Xshell 和Ubuntu通过ssh远程协议连接。

    sudo apt-get install openssh-server

    正常出现下面的情况:

    技术图片

    benjie@ubuntu:~$ sudoapt-get install openssh-server
    Reading package lists... Done
    Building dependencytree       
    Reading state information... Done
    Some packages could not be installed. This may mean thatyou have
    requested an impossiblesituation or if you are using the unstable
    distribution that somerequired packages have not yet been created
    or been moved out of Incoming.
    The following informationmay help to resolve the situation:
    The following packageshave unmet dependencies:
      openssh-server : Depends: openssh-client (= 1:6.6p1-2ubuntu1) but 1:6.6p1-2ubuntu2.7 is to beinstalled
                                        Recommends: ncurses-term but it is not going to beinstalled
                                        Recommends: ssh-import-id but it is not going to beinstalled
    E: Unable to correct problems, youhave held broken packages.

    那是因为openssh-server 依赖于openssh-client,Ubuntu不是自带了openssh-client了吗? 因为自带的openssh-client的版本与openssh-client所依赖的不同,因此需
    要执行下面的命令:

    sudo apt-get install openssh-client=1:6.6p1-2ubuntu1

    技术图片

    再执行命令:sudo apt-get install openssh-server

    技术图片

    安装完成后可以通过ps -e|grep ssh查看openssh-server是否安装成功;
    技术图片


  • 评论


    亲,登录后才可以留言!