I'm trying to install openssh-server on a Ubuntu server 20.04. When I try to install it with the following command:
sudo apt-get install openssh-serverthe process wants to install openssh-client, openssh-sftp-server and ssh-import-id. If I proceed and try to remove openssh-client, openssh-server and the other packages are removed too.
Is there a way to install openssh-server only?
11 Answer
openssh-server has a dependency on openssh-client. That means the client is needed by the server. You will need to install the client. I would like to show you the full list of dependencies, but I do not have 20.04 installed, yet. Try this command:
less /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_focal-security_main_binary-amd64_Packages
Then type in /Package: openssh-server to find the section for openssh-server. Then look for the Depends: line just below that. It should show you what packages it depends on.