代码改变世界

ubuntu 安装 openssh-server出问题

2013-01-09 20:50  金融与IT的极速狂想曲  阅读(2709)  评论(0编辑  收藏  举报

若安装openssh-server时提示下面错误:

bill@ubuntu:~$ sudo apt-get install openssh-server
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:5.3p1-3ubuntu3) but 1:5.3p1-3ubuntu7 is to be installed
E: Broken packages

则需卸载掉默认安装的openssh-client(因版本较新,而openssh-server依赖的版本较旧):

sudo apt-get  autoremove  openssh-client

然后再重新安装它们:

sudo apt-get install openssh-client openssh-server

启动sshd服务:

sudo /etc/init.d/ssh start

这样,可以在远程Linux机器上利用scp命令 往我的ubuntu上copy文件了