Quantcast
Viewing all articles
Browse latest Browse all 4147

Troubleshooting • Re: Configuring sshd to listen on particular IP failing. SSHD starting before network is up.

Indeed, I checked one of my systems and ssh is set to After=network.target. Unfortunately, that's too early if you want to do something like you're doing, to constrain sshd to specific IP addresses.

Here's what I'd suggest. Did not try, but it should work.
  • sudo cp /lib/systemd/system/ssh.service /etc/systemd/system/ssh.service
  • sudo nano /etc/systemd/system/ssh.service and change "After=network.target" to "After=network-online.target" (be sure to leave the rest of the line as is)
  • Exit the editor
  • Reboot and test
  • Celebrate success or sob sadly and then examine journalctl output very carefully if failure

Statistics: Posted by bls — Mon Mar 17, 2025 1:44 pm



Viewing all articles
Browse latest Browse all 4147

Trending Articles