ubuntu16.04 the perfect solution for openssh-server to rely on errors (very good) _linux

Source: Internet
Author: User
Tags ssh

Problem: After system reload, install and configure SSH, firewall configuration

#安装install openssh-server
sudo apt install openssh-server-y

Problem encountered:

sudo apt install openssh-server-y

Reading Package List ... Complete

Analyzing Dependency tree for Package

Reading status information ... Complete

There are some software packages that cannot be installed. If you are using a unstable release, this may be

Because the system is not up to the state you requested. There may be some of the software you need in this release

Packages have not been created or they have been removed from the new to (incoming) directory.

The following information may help solve the problem:

The following packages have unsatisfied dependencies:

Openssh-server: Dependence: openssh-client (= 1:7.1p1-4)

Dependencies: Openssh-sftp-server But it will not be installed

Recommendation: Ssh-import-id But it will not be installed

E: Errors cannot be fixed because you want some packages to stay the way they are, which destroys dependencies between packages.

Workaround:

Ubuntu has a openssh-client, so you can get it through

SSH Username@host

To connect to Linux remotely

But to be connected via SSH, the Ubuntu system needs to have openssh-server, which can be

Ps-e | grep ssh

To see if the sshd is not displayed and the Openssh-server is not installed

Available through

sudo apt-get install Openssh-server

To install the Openssh-server, if the successful installation will succeed if you encounter

$ sudo apt install openssh-server-y

Reading Package List ... Complete

Analyzing Dependency tree for Package

Reading status information ... Complete

There are some software packages that cannot be installed. If you are using a unstable release, this may be

Because the system is not up to the state you requested. There may be some of the software you need in this release

Packages have not been created or they have been removed from the new to (incoming) directory.

The following information may help solve the problem:

The following packages have unsatisfied dependencies:

Openssh-server: Dependence: openssh-client (= 1:7.1p1-4)

Dependencies: Openssh-sftp-server But it will not be installed

Recommendation: Ssh-import-id But it will not be installed

E: Errors cannot be fixed because you want some packages to stay the way they are, which destroys dependencies between packages.

This is because, openssh-server is dependent on the Openssh-clien, that Ubuntu did not bring the openssh-client? The original Openssh-clien is dependent on the version of the openssh-server you are installing, and the version you rely on here is

1:7.1p1-4

So to install the corresponding version of the Openssh-clien, to cover out the Ubuntu

PS: Below see the solution that Ubuntu cannot install Openssh-server

Commands for using Ubuntu installation

sudo apt-get install Openssh-server

The following error occurred

There are no available package openssh-server, but it is referenced by other packages.

This may mean that the missing package may have been discarded or could only be found in the labor insurance release source.

E: Package Openssh-server There are no candidates available for installation

Solving method

Command:

sudo apt-get update

Then download the openssh-server with the following command

Command:

sudo apt-get install Openssh-server

That's OK.

Check the SSH service open state

Ps-s | grep ssh
#启用ssh的指令
start ssh service:
#sudo/etc/init.d/ssh start
stop SSH service:
#sudo/etc/init.d/ssh Stop Reboot
SSH service:
#sudo/etc/init.d/ssh Restart

The above is a small set to introduce the ubuntu16.04 under the installation of Openssh-server newspaper rely on the perfect solution (very good), I hope to help you, if you have any questions welcome to my message, small series will promptly reply to everyone!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.