解决docker中oyente无法安装openssh-server的问题:
将容器中的/etc/apt/sources.list文件中的内容替换为
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
之后执行命令
apt-get update
apt-get install openssh-server --fix-missing
若安装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:6.6p1-2ubuntu2.13) but 1:7.5p1-10ubuntu0.1 is to be installed
Recommends: ncurses-term but it is not going to be installed
Recommends: ssh-import-id but it is not going to be installed
E: Unable to correct problems, you have held 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