Tell me what I'm doing wrong, the situation is the following: I want to install OpenSSH in Ubuntu using the command sudo apt-get install openssh-server, but as a result I get an error: Package openssh-server has no installation candidate.

PS openssh-client is installed.

    2 answers 2

    I had the same error when the installed package was not in the official (preinstalled in configs) repositories. But openssh-server is just from official.

    Check the list of repositories: /etc/apt/sources.list and after editing apt-get update.

    I will not pretend to the completeness of the answer, but it helped me - I added it manually. You may have damaged it. To resolve issues, put the entire console output up to the line

    E: Package openssh-server has no installation candidate. 
    • Yes, thanks, I just found the same solution. - Eugen

    Try installing the ssh virtual package (sudo aptitude install ssh). It should pull in dependencies and the server and the client.

    • dependencies will install openssh-server and again openssh-server has no installation candidate - Bodrov Andrey