From 63b76d59cd79a0f9aa4121400ba6b6944049341d Mon Sep 17 00:00:00 2001 From: Martin <1224973+mavaa@users.noreply.github.com> Date: Sat, 4 Feb 2023 13:11:39 +0100 Subject: [PATCH] sshd: Document dhcp requirement for listenAddress Signed-off-by: Sefa Eyeoglu --- nixos/modules/services/networking/ssh/sshd.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix index 3aafbabf901a..c289d1961205 100644 --- a/nixos/modules/services/networking/ssh/sshd.nix +++ b/nixos/modules/services/networking/ssh/sshd.nix @@ -345,6 +345,15 @@ in NOTE: this will override default listening on all local addresses and port 22. NOTE: setting this option won't automatically enable given ports in firewall configuration. + NOTE: If the IP address is not available at boot time, the following has + to be added to make sure sshd will wait for dhcp configuration: + ```nix + systemd.services.sshd = { + wants = [ "network-online.target" ]; + after = [ "network-online.target" ]; + }; + ``` + See the following issue for details: ''; };