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

SSH listenaddress bug note #62

Open
JustEnoughDucks opened this issue Nov 28, 2020 · 3 comments
Open

SSH listenaddress bug note #62

JustEnoughDucks opened this issue Nov 28, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@JustEnoughDucks
Copy link

In some systems this bug will occur: sshd will not start at boot if ListenAddress is set. I ran into it myself following this guide. It is a failure of systemd and ssh devs to communicate who will fix it.

Anyway, there is a simple workaround to it by 'nimishp12':

changing /etc/systemd/system/sshd.service:

After=network.target audit.target
Wants=network.target

to

Requires=multi-user.target
Before=shutdown.target
After=multi-user.target
Wants=multi-user.target

This also solves the problem of using various network.service/targets that may still cause issues just using Before/After network-online.target

@imthenachoman
Copy link
Owner

Does this work for you? It doesn't work for me.

@imthenachoman imthenachoman self-assigned this Dec 15, 2020
@imthenachoman imthenachoman added the enhancement New feature or request label Dec 15, 2020
@JustEnoughDucks
Copy link
Author

JustEnoughDucks commented Dec 15, 2020

Did you end up having the listenaddress issue too?

Yes, the lines I posted work for me, but in that bug report, I think there are 3 different methods to try (like the network-online.target Before/after). I am really not sure why different ones are working for different people. Perhaps it is just the service start order?

@imthenachoman
Copy link
Owner

Yes, I had issues. I will keep playing with it.

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

No branches or pull requests

2 participants