Problem with SSH in Zorin 17 Core

I have tried to activate SSH in Zorin 17 with sudo systemctl enable ssh but I get only this Failed to enable unit: Unit file ssh.service does not exist
I have followed Unbuntu instructions to install openssh-server, but it does not work either.
How can I activate SSH i Zorin OS?

Hi, welcome to Zorin OS.

The name of the service is sshd with a "d" at the end, for daemon.

2 Likes

Thanks for information. I tried sshd but it doesn't work. Got this:
anders@anders-HP-ENVY-15-Notebook-PC:~$ sshd
Command 'sshd' not found, but can be installed with:
sudo apt install openssh-server

I installed openssh-server but got some depences and tested with
apt --fix-broken install but still problem.

In my RaspberryPi is openssh-server is installed and it works fine but here in Zorin several functions/service/programs are not installed.

The command that you run is ssh. However, the background process to listen to incoming connections is sshd.

So, if you need to connect to some host you would use ssh <ip/domain>, but if you want to restart the service, for example, then you use systemctl restart sshd.

As I can see there is no ssh service installed in Zorin.
anders@anders-HP-ENVY-15-Notebook-PC:~$ systemctl restart sshd
Failed to restart sshd.service: Unit sshd.service not found.
anders@anders-HP-ENVY-15-Notebook-PC:~$ sudo systemctl status sshd
[sudo] password for anders:
Unit sshd.service could not be found.
anders@anders-HP-ENVY-15-Notebook-PC:~$ sudo systemctl enable ssh
Failed to enable unit: Unit file ssh.service does not exist.

I have tried to install openssh-server but it failed.

Anyway this is a test of Zorin OS and I use it most for hamradio programs. Install of WSJTX, JS8CALL and SDRPlays SDR-connect works fine.
I think I remove Zorin 17 and make a new install of Zorin 18 or some other Linux.
Thanks for your help.

It seems SSH is not fully installed on your Zorin OS yet. You will need to install the OpenSSH server package first before enabling it. Once installed, you can start and enable the service from your system settings or terminal. If the issue continues, update your system and try reinstalling the SSH package - it should work after that.

1 Like

The functionality for SSH is broken up into two packages: openssh-client and openssh-server.
The client is what allows you to use the ssh command to initiate connections to remote servers, and is already installed by default in Zorin OS (both 17 and 18).
The server package contains, well, the server that runs in the background listening to incoming connections on the configured port (default is 22). That's the sshd service.

So, let's walk through how to install and set up SSH:

  1. Confirm which packages are installed:

    apt list --installed | grep ssh
    

    Returns:

    libssh-4/jammy-updates,jammy-security,now 0.9.6-2ubuntu0.22.04.4 amd64 [installed,automatic]
    libssh-gcrypt-4/jammy-updates,jammy-security,now 0.9.6-2ubuntu0.22.04.4 amd64 [installed,automatic]
    openssh-client/jammy-updates,jammy-security,now 1:8.9p1-3ubuntu0.13 amd64 [installed,automatic]
    sshfs/jammy,now 3.7.1+repack-2 amd64 [installed,automatic]
    

    As expected, the openssh-client package is already installed. We can run it right away to connect to some server with ssh <ip/domain>.

  2. Install the server package to listen to incoming connections:

    sudo apt install openssh-server
    apt list --installed | grep ssh
    

    Checking for the installed packages now returns:

    libssh-4/jammy-updates,jammy-security,now 0.9.6-2ubuntu0.22.04.4 amd64 [installed,automatic]
    libssh-gcrypt-4/jammy-updates,jammy-security,now 0.9.6-2ubuntu0.22.04.4 amd64 [installed,automatic]
    openssh-client/jammy-updates,jammy-security,now 1:8.9p1-3ubuntu0.13 amd64 [installed,automatic]
    openssh-server/jammy-updates,jammy-security,now 1:8.9p1-3ubuntu0.13 amd64 [installed]
    openssh-sftp-server/jammy-updates,jammy-security,now 1:8.9p1-3ubuntu0.13 amd64 [installed,automatic]
    ssh-import-id/jammy,jammy,now 5.11-0ubuntu1 all [installed,automatic]
    sshfs/jammy,now 3.7.1+repack-2 amd64 [installed,automatic]
    
  3. The background service should be already running, we can verify that with:

    sudo systemctl status sshd
    
    zenzen@zenzen:~$ sudo systemctl status ssh
    â—Ź ssh.service - OpenBSD Secure Shell server
      Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
      Active: active (running) since Mon 2025-10-27 11:45:58 -03; 44s ago
      Docs: man:sshd(8)
              man:sshd_config(5)
      Main PID: 4265 (sshd)
      Tasks: 1 (limit: 4494)
      Memory: 1.7M
      CPU: 14ms
      CGroup: /system.slice/ssh.service
              └─4265 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
      oct 27 11:45:58 zenzen systemd[1]: Starting OpenBSD Secure Shell server...
      oct 27 11:45:58 zenzen sshd[4265]: Server listening on 0.0.0.0 port 22.
      oct 27 11:45:58 zenzen sshd[4265]: Server listening on :: port 22.
      oct 27 11:45:58 zenzen systemd[1]: Started OpenBSD Secure Shell server.
    

    If the service can't start, it will show an error here, or at least a reference as to what went wrong.

If you're going to try on Zorin OS 18 (or any other distribution based on 24.04 and later) keep in mind that the name of the service has changed to ssh as you originally typed it. If you've looked up guides online maybe this is what is causing the confusion here, as Zorin OS 17 is based on 22.04.

Thanks for a good description and instruction about SSH server/client.
I have tested now after your instruction and got following:
Part #1
I got the same return as you but with one more line-

libssh-4/jammy-updates,jammy-security,now 0.9.6-2ubuntu0.22.04.4 i386 [installerat,automatiskt]

Anyway the client works as expected in test with one of my other computers.

Part #2
I tried to install the server packages but I got some depedencies. From the return information I used fix--broken install but still some warning of not installed programs.

anders@anders-HP-ENVY-15-Notebook-PC:~$ sudo apt install openssh-server
Läser paketlistor… Ready
Bygger beroendeträd… Färdig
Läser tillståndsinformation… Färdig
You should run ”apt --fix-broken install” för att korrigera dessa.
Following paackages have dependensies that cannot be satisfied:
 js8call : Beroende av: wsjtx-data men det kommer inte att installeras
 openssh-server : Dependent of: openssh-sftp-server
                  Recommends: ncurses-term but will not be installed.
                  Recommends: ssh-import-id but will not be installed.
E: Otillfredsställda beroenden. Prova med ”apt --fix-broken install” utan paket (eller ange en lösning).
anders@anders-HP-ENVY-15-Notebook-PC:~$ apt --fix-broken install
E: Could not open the lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

Sorry but I have a Swedish Zorin so I have translated some of the comments
The programs JS8CALL and WSJTX works fine.

I got same return as in #1 with apt list installed | grep ssh
As I can see the server is not correct installed.

Part #3 Output from status request are:
anders@anders-HP-ENVY-15-Notebook-PC:~$ sudo systemctl status sshd
Unit sshd.service could not be found

I have not so good experience of Linux to fix this at the moment and it is not important to use just now but it would to be nice in the future.
Anyway I have got a good information about SSH and I think I go to install Zorin 18 and not wait for time to upgrade from ver. 17.
Thanks a lot for your help and I hope it works later för me.

Edited to add some formatting on the output from the terminal.


It looks like the error was due to the command apt --fix-broken install which requires root privileges, so needs to be ran as sudo apt --fix-broken install. If you are still up for it, try again like so and hopefully that will fix it.

That's also fine. Remember that in Zorin OS 18 the name of the background service is also ssh same as the command. But everything else should be identical, and even the service should be activated automatically after installing it.

Yes I have tried this too but server is not installed.

From the terminal:
anders@anders-HP-ENVY-15-Notebook-PC:~$ sudo apt --fix-broken install
[sudo] password for anders:
Läser paketlistor… Färdig
Bygger beroendeträd… Färdig
Läser tillståndsinformation… Färdig
Korrigerar beroenden… Färdig
Följande paket har installerats automatiskt och är inte längre nödvändiga:
libfwupdplugin5 libgcab-1.0-0 libsmbios-c2
Använd ”sudo apt autoremove” för att ta bort dem.
The following additional packages will be installed:
wsjtx-data
Följande NYA paket kommer att installeras:
wsjtx-data
0 att uppgradera, 1 att nyinstallera, 0 att ta bort och 52 att inte uppgradera.
5 är inte helt installerade eller borttagna.
Behöver hämta 0 B/3 684 kB arkiv.
Efter denna åtgärd kommer ytterligare 3 836 kB utrymme användas på disken.
Vill du fortsätta? [J/n] J
(Läser databasen ... 272480 filer och kataloger installerade.)
Förbereder att packa upp .../wsjtx-data_2.5.4+repack-1_all.deb ...
Packar upp wsjtx-data (2.5.4+repack-1) ...
dpkg: fel vid hantering av arkivet /var/cache/apt/archives/wsjtx-data_2.5.4+repa
ck-1_all.deb (--unpack):
försöker skriva över "/usr/share/pixmaps/wsjtx_icon.png" som också finns i pake
tet wsjtx 2.7.0
dpkg-deb: fel: klistra in subprocess was killed by signal (Broken pipe)
Fel uppstod vid hantering:
/var/cache/apt/archives/wsjtx-data_2.5.4+repack-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
anders@anders-HP-ENVY-15-Notebook-PC:~$ sudo systemctl status sshd
Unit sshd.service could not be found.

I think the issue has to do with this wsjtx package. It looks like for whatever reason is not able to update and is causing the whole operation to fail.

Did you install this manually from a .deb file? You can try deleting the cache for it (be very careful when running rm and sudo at once).

sudo rm /var/cache/apt/archives/wsjtx-data_2.5.4+repa
ck-1_all.deb

And then update again with sudo apt update and let's see if that gives an error or something.

WSJTX was installed from Zorin software and it was .deb package
Ok, I tested your info and no error at rm.
Run sudo apt upgrade and no error.
Tried run fix broken install again and restart of Zorin but no progress.
It seems wsjtx fail install of ssh-server.
SSH server is not installed.
Thanks for your patience to heip me.

Problem with SSH-server seems to be temporary solved.
Some broken files from install of WSJTX and JS8CALL blocked the finish of OpenSSH-server install.
After uninstall of those two programs. the install of OpenSSH-server became correct finished and it works as expected.
Thanks all for your help!

1 Like