Score:1

How can I install openssh-server without openssh-client on Ubuntu Server 20.04

bo flag

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-server

the 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?

muru avatar
us flag
Why do you want to do this? IIRC some connections involve launching the client on the server with a different set of arguments (e.g. scp), so this will definitely break functionality.
Score:0
lu flag

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.

muru avatar
us flag
You don't need to do all that. Either `apt-cache depends openssh-server` or the package index (https://packages.ubuntu.com/focal/openssh-server) is enough.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.