After a big update yesterday ssh no longer works although installed

Yesterday there was a major upgrade. I use manjaro sway. Before I did the upgrade yesterday the ssh server was working. Now although openssh is installed, when I do “sudo systemctl start ssh” I get the error:

Failed to start ssh.service: Unit ssh.service not found

Same issue on my other computer with manjaro after upgrade.

When I run systemctl.status sshd it says Loaded but inactive.

I have double-checked that it is installed and have reinstalled it. Doesn’t help.

I would welcome any advice or help.

Thanks.

From this thread on Arch, from a while back:

[SOLVED] No ssh-agent.service systemd unit

It’s a user service.

systemctl --user status ssh-agent.service

… and from [SOLVED] sshd not starting on (re)boot even with unit enabled

Check if sshd.socket is enabled with “systemctl status sshd.socket”. If it is, disable it and enable “sshd.service” (if you haven’t yet). That should be it.

Hope this helps!

If you are using openssh, you could try;

systemctl status sshd

to … check its status, or;

systemctl start sshd

to start the sshd service.

This seems to enable it;

systemctl enable sshd

but, see the man to make sure:

man sshd

Regards.

That’s exactly the 3 commands I did yesterday before the upgrade. Everything worked. Today I have repeated exactly those 3 commands and for the last 2 I get “Unit ssh.service not found” despite ssh being installed.

Instead of reinstalling it, have you tried uninstalling, rebooting and installing again?

sudo pacman -Rns openssh

reboot/relogin

sudo pacman -Syu openssh

Okay. I tried a different command which seemed to work. Instead of

sudo systemctl enable sshd

which worked yesterday, I did:

sudo systemctl enable ssh.service

I just need to reboot and see if ssh is now running as a persistent service.

Thanks for providing that link. The command mentioned there seemed to fix the problem for me.

sudo systemctl enable sshd.service

I had been using what I had always done before:

sudo systemctl enable sshd. For some reason after the upgrade it seems the command has changed or something. Who knows.

Anyway I restarted and now ssh does seem to be running as a service on startup.

Thanks so much!!

1 Like

systemctl enable sshd still works for me; it creates the sshd.service symlink as expected. :man_shrugging:

Regards.

It worked for me fine as of yesterday so I think somehow the upgrade changed things. But I can’t say for sure. Thanks for your help by the way.

Strange. I doubt it was anything to do with the update though. If it was, we’d all have the same issue.

At least it’s working now, anyway.

Cheers.

You may be right. I am wondering if I just fell for the old after therefore because fallacy.

I am starting to think that somehow there was nothing wrong other than that there was some other process going on behind the scenes that was temporarily interfering when I sent those systemctl commands. If I’d just waited for ten minutes maybe they’d all have worked, I don’t know.

Anyway, I unchecked this as solved because now I think it’s possible there was never any problem. Maybe just the command wasn’t getting through right away on my system and so was sending an error.

Sorry, I’m no linux expert. I did get those errors connecting. But maybe it was just slow connections on my particular system.

And on another tangent; if you had entered;

systemctl enable ssh

(without the “d”) then the result appears as;

Failed to enable unit: Unit ssh.service does not exist

Whereas;

systemctl enable sshd

might have worked as expected. The result of simply forgetting the d could have resulted in temporary confusion; it can happen to the best and the worst of us. :smile_cat:

But, if you like, we can just close the topic without the solution.

Regards.

3 Likes

God, I think maybe that was the whole thing, I forgot the d!! Ugh. Sorry all and thanks for your help. I will check your last message as the solution. REMEMBER the “d”!!!

4 Likes