Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: SSH not restarting with "sudo systemctl restart sshd.service" #93

Closed
WJ4IoT opened this issue Dec 11, 2024 · 2 comments · Fixed by #94
Closed

docs: SSH not restarting with "sudo systemctl restart sshd.service" #93

WJ4IoT opened this issue Dec 11, 2024 · 2 comments · Fixed by #94

Comments

@WJ4IoT
Copy link

WJ4IoT commented Dec 11, 2024

I notice the command "sudo systemctl restart sshd.service"" does not work on my system:
and "Failed to restart sshd.service: Unit sshd.service not found."

where the command "sudo systemctl restart ssh.service" just works.

I do not have an original "/etc/ssh/sshd_config" anymore because i am working on an older system but this system is now updated to the latest Ubuntu LTS server version (Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-50-generic x86_64), I do have "/etc/ssh/sshd_config.ucf-dist"),

How do I become in this case a fresh copy of "/etc/ssh/sshd_config"?

Reported from: https://documentation.ubuntu.com/server/how-to/security/openssh-server/

@WJ4IoT WJ4IoT changed the title docs: TYPE YOUR QUESTION HERE docs: SSH not restarting with "sudo systemctl restart sshd.service" Dec 11, 2024
@cpaelzer
Copy link
Contributor

Hi @WJ4IoT ,
I first wanted to say that seems like a config issue, but it might be legit the more I look into it.

I noticed it was good earlier (e.g. jammy) and later (e.g. plucky) in a quick re-check.
While looking if I should file that bug I spotted that I'm about a month too late => https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/2087949

It is already being fixed (that is why it works in plucky) and on the way for the fix to be backported.

For the docs, we could just make it sshd->ssh to avoid that issue immediately. And while ssh.service isn't as clear to be "the daemon" it is the primary name of the service file - so that should be fine.

cpaelzer added a commit to cpaelzer/ubuntu-server-documentation that referenced this issue Dec 12, 2024
The old used to work and will work again after [1] is fixed,
but the ssh service on disk is /usr/lib/systemd/system/ssh.service
and sshd only an alias (which currently happens to be broken on noble).
Using ssh.service in our examples avoids readers to stumble until
fixed in an SRU and can stay as-is afterwards.

[1]: https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/2087949

Fixes: canonical#93

Signed-off-by: Christian Ehrhardt <[email protected]>
@slyon slyon closed this as completed in #94 Dec 12, 2024
@WJ4IoT
Copy link
Author

WJ4IoT commented Dec 12, 2024

Thanks for your swiftly answer, I missed the "fantastic Ubuntu Summit" despite it was on walking distance from of my home.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants