安装 ssh

sudo apt-get install openssh-server

安装openssh-server,如果顺利的话会安装成功,如果遇到以下问题:

openssh-server : Depends: openssh-client (= 1:7.2p2-4ubuntu2.1)
Depends: openssh-sftp-server but it is not going to be installed
Recommends: ncurses-term but it is not installable
Recommends: ssh-import-id but it is not installable
E: Unable to correct problems, you have held broken packages.

原因如下:
这是因为,openssh-server是依赖于openssh-clien的,那ubuntu不是自带了openssh-client吗?

原由是自带的openssh-clien与所要安装的openssh-server所依赖的版本不同,这里所依赖的版本是:

1:7.2p2-4ubuntu2.1
所以要安装对应版本的openssh-clien,来覆盖掉ubuntu自带的

sudo apt-get install openssh-client=1:7.2p2-4ubuntu2.1

这样再安装openssh-server就可以成功了。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容