Bug#1101489: error: Bind to port 22 failed when ListenAddress is set
Package: openssh-server
Version: 1:9.2p1-2+deb12u5
Severity: important
X-Debbugs-Cc: nospam@yahoo.com
Dear Maintainer,
*** Reporter, please consider answering these questions, where appropriate ***
* What led up to the situation?
* What exactly did you do (or not do) that was effective (or
ineffective)?
* What was the outcome of this action?
Debian12
openssh-server 1:9.2p1-2+deb12u5 arm64
sshd starts before the ethernet interface gets an IP address.
With
ListenAddress 192.168.0.2
in
/etc/ssh/sshd_config
Result
error: Bind to port 22 failed: Cannot assign requested address.
systemctl edit sshd.service
and inserting the following:
[Unit]
After=network-online.target
does not help.
* What outcome did you expect instead?
sshd active after reboot when ListenAddress is set in sshd_config
*** End of the template - remove these template lines ***
-- System Information:
Debian Release: 12.10
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: arm64 (aarch64)
Kernel: Linux 6.1.0-odroid-arm64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_CRAP
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages openssh-server depends on:
ii adduser 3.134
ii debconf [debconf-2.0] 1.5.82
ii init-system-helpers 1.65.2
ii libaudit1 1:3.0.9-1
ii libc6 2.36-9+deb12u10
ii libcom-err2 1.47.0-2
ii libcrypt1 1:4.4.33-2
ii libgssapi-krb5-2 1.20.1-2+deb12u2
ii libkrb5-3 1.20.1-2+deb12u2
ii libpam-modules 1.5.2-6+deb12u1
ii libpam-runtime 1.5.2-6+deb12u1
ii libpam0g 1.5.2-6+deb12u1
ii libselinux1 3.4-1+b6
ii libssl3 3.0.15-1~deb12u1
ii libsystemd0 252.36-1~deb12u1
ii libwrap0 7.6.q-32
ii openssh-client 1:9.2p1-2+deb12u5
ii openssh-sftp-server 1:9.2p1-2+deb12u5
ii procps 2:4.0.2-3
ii runit-helper 2.15.2
ii sysvinit-utils [lsb-base] 3.06-4
ii ucf 3.0043+nmu1+deb12u1
ii zlib1g 1:1.2.13.dfsg-1
Versions of packages openssh-server recommends:
ii libpam-systemd [logind] 252.36-1~deb12u1
ii ncurses-term 6.4-4
ii xauth 1:1.1.2-1
Versions of packages openssh-server suggests:
pn molly-guard <none>
pn monkeysphere <none>
pn ssh-askpass <none>
pn ufw <none>
-- debconf information excluded
Reply to: