ubuntu14.05 安装 ssh

来源:互联网 发布:linux卸载光盘命令 编辑:程序博客网 时间:2024/05/22 13:26

root@ubuntu:~# apt-get install ssh 

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:


The following packages have unmet dependencies:
 ssh : Depends: openssh-server (>= 1:6.6p1-2ubuntu1)//提示这个库没有找到
E: Unable to correct problems, you have held broken packages.
root@ubuntu:~# apt search openssh-server//安装openssh-server
Sorting... Done
Full Text Search... Done
openssh-server/trusty 1:6.6p1-2ubuntu1 amd64
  secure shell (SSH) server, for secure access from remote machines


root@ubuntu:~# apt-get install openssh-server=1:6.6p1-2ubuntu1//安装openssh-server=1:6.6p1-2ubuntu1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:


The following packages have unmet dependencies:
 openssh-server : Depends: openssh-client (= 1:6.6p1-2ubuntu1)//提示这个库没有找到
                  Recommends: ssh-import-id but it is not going to be installed//推荐安装这个库

E: Unable to correct problems, you have held broken packages.


执行下面这些命令安装ssh

apt-get install ssh-import-id

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

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

apt-get install ssh