Openssh-client is installed by default in Ubuntu, so when installing SSH, just install openssh-server, and install the software in the process of a similar problem:
When installing Openssh-server, it is found to be dependent on: openssh-client. However, due to the current system comes with openssh-client version than the required version, that is, the version is incompatible, resulting in SSH installation failure.
This software installation problem arises mainly from the source problem. In order to be able to install successfully, we first need to uninstall the high version of Openssh-client, and then the installation of SSH. But enter directly:
sudo apt-get remove openssh-client , but cannot be deleted directly. A problem with the lookup, or the source. The actual concrete steps are as follows:
1. Delete the contents of the Sources.list, remove the connection to the source, note: Back up the source before deleting
sudo cp /etc/apt/sources.list /ETC/APT/SOURCES.LIST_BK
sudo echo "" >/etc/apt/sources.list
2. Sudo apt-getupdate
3. Sudo apt-get upgrade
4. Sudo apt-get remove openssh-client : After you have modified the above source, you can delete the Openssh-client
5. Restore the contents of the Sources.list
sudo mv/etc/apt/sources.list_bk sudo cp/etc/apt/sources.list
6. sudo apt-get update
7. Sudo apt-get upgrade
8. try to install SSH
sudo apt-get install SSH
The result is new problem, hint: dpkg: deal with XXX (--configure) error;
Here's how to fix it:
1. Rename the info folder now
$ sudo mv/var/lib/dpkg/info/var/lib/dpkg/info_old
2. Create a new info folder
$ sudo mkdir/var/lib/dpkg/info
3. $sudo apt-get Update
4. install SSH again to successfully
$apt-get-finstall SSH
5. After the last step, you will generate some files under the new Info folder, and now move the files to the Info_old folder
$ sudo mv/var/lib/dpkg/info/*/var/lib/dpkg/info_old
6.$ sudo rm-rf/var/lib/dpkg/info
7.$ sudo mv/var/lib/dpkg/info_old/var/lib/dpkg/info
8. Check if SSH is installed successfully, there is an sshd description is OK
$sudo Ps–e | Grepssh
9. start the SSH service
$sudo servicessh Start
Ubuntu install SSH server: Openssh-server failed