[Bug 1993869] Re: openssh-server cannot listen or bind to anything other than :::22 after upgrading to 22.10 from 22.04
Lukas Märdian
1993869 at bugs.launchpad.net
Thu Oct 27 08:31:53 UTC 2022
Thanks for your confirmation, closing.
** Summary changed:
- openssh-server cannot listen or bind to anything other than :::2 after upgrading to 22.10 from 22.04
+ openssh-server cannot listen or bind to anything other than :::22 after upgrading to 22.10 from 22.04
** Description changed:
This is a bug report to separate the second issue that was reported in this bug report:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1993478
There's an issue after upgrading to 22.10 from 22.04 that prevents
- opensshd from listening to anything other than :::2. I already commented
- in the bug report I linked, so I'll just copy/paste and add some
- details. I guess.
+ opensshd from listening to anything other than :::22. I already
+ commented in the bug report I linked, so I'll just copy/paste and add
+ some details. I guess.
The issue is that after upgrading, sshd doesn't use the Listen port or
ListenAddress config from the sshd_config file or any custom config file
that was in the sshd_config.d drop in folder anymore.
Other drop in settings from sshd.config.d seem to be applied normally,
the issue seem to be only for IP binding and custom ports.
If I change Accept=no by Accept=yes in ssh.socket and reloads the socket
unit, I can start sshd on a different port and I can also bind the IP to
something else than ::
There's an issue still, an instance of sshd is still listening to :::22
that is not started by SSHD but by init.
root at ubuntulocal:~# netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 568/vsftpd
tcp 0 0 0.0.0.0:622 0.0.0.0:* LISTEN 571/sshd: /usr/sbin
tcp 0 272 192.168.1.225:622 192.168.1.220:2473 ESTABLISHED 1027/sshd: root at pts
tcp6 0 0 :::22 :::* LISTEN 1/init
If I reboot after changing this no to yes in ssh.socket does not survive a reboot and fails to load sshd with a "Failed to queue service startup job" error.
Oct 21 15:41:56 ubuntulocal systemd[1]: ssh.socket: Failed to queue service startup job (Maybe the service file is missing or not a template unit?): Invalid argument
Oct 21 15:41:56 ubuntulocal systemd[1]: ssh.socket: Failed with result 'resources'.
I had to mask/stop the sshd.socket unit and create a custom sshd service
in /etc/systemd/system to be able start sshd on a custom port and IP.
-
chris at ubuntulocal:~$ systemctl status ssh.socket
● ssh.socket - OpenBSD Secure Shell server socket
- Loaded: loaded (/lib/systemd/system/ssh.socket; enabled; preset: enabled)
- Active: active (running) since Fri 2022-10-21 23:08:09 UTC; 1min 24s ago
- Until: Fri 2022-10-21 23:08:09 UTC; 1min 24s ago
- Triggers: ● ssh.service
- Listen: [::]:22 (Stream)
- Tasks: 0 (limit: 18899)
- Memory: 4.0K
- CPU: 418us
- CGroup: /system.slice/ssh.socket
+ Loaded: loaded (/lib/systemd/system/ssh.socket; enabled; preset: enabled)
+ Active: active (running) since Fri 2022-10-21 23:08:09 UTC; 1min 24s ago
+ Until: Fri 2022-10-21 23:08:09 UTC; 1min 24s ago
+ Triggers: ● ssh.service
+ Listen: [::]:22 (Stream)
+ Tasks: 0 (limit: 18899)
+ Memory: 4.0K
+ CPU: 418us
+ CGroup: /system.slice/ssh.socket
** Changed in: openssh (Ubuntu)
Status: Incomplete => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to openssh in Ubuntu.
https://bugs.launchpad.net/bugs/1993869
Title:
openssh-server cannot listen or bind to anything other than :::22
after upgrading to 22.10 from 22.04
Status in openssh package in Ubuntu:
Invalid
Bug description:
This is a bug report to separate the second issue that was reported in this bug report:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1993478
There's an issue after upgrading to 22.10 from 22.04 that prevents
opensshd from listening to anything other than :::22. I already
commented in the bug report I linked, so I'll just copy/paste and add
some details. I guess.
The issue is that after upgrading, sshd doesn't use the Listen port or
ListenAddress config from the sshd_config file or any custom config
file that was in the sshd_config.d drop in folder anymore.
Other drop in settings from sshd.config.d seem to be applied normally,
the issue seem to be only for IP binding and custom ports.
If I change Accept=no by Accept=yes in ssh.socket and reloads the
socket unit, I can start sshd on a different port and I can also bind
the IP to something else than ::
There's an issue still, an instance of sshd is still listening to
:::22 that is not started by SSHD but by init.
root at ubuntulocal:~# netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 568/vsftpd
tcp 0 0 0.0.0.0:622 0.0.0.0:* LISTEN 571/sshd: /usr/sbin
tcp 0 272 192.168.1.225:622 192.168.1.220:2473 ESTABLISHED 1027/sshd: root at pts
tcp6 0 0 :::22 :::* LISTEN 1/init
If I reboot after changing this no to yes in ssh.socket does not survive a reboot and fails to load sshd with a "Failed to queue service startup job" error.
Oct 21 15:41:56 ubuntulocal systemd[1]: ssh.socket: Failed to queue service startup job (Maybe the service file is missing or not a template unit?): Invalid argument
Oct 21 15:41:56 ubuntulocal systemd[1]: ssh.socket: Failed with result 'resources'.
I had to mask/stop the sshd.socket unit and create a custom sshd
service in /etc/systemd/system to be able start sshd on a custom port
and IP.
chris at ubuntulocal:~$ systemctl status ssh.socket
● ssh.socket - OpenBSD Secure Shell server socket
Loaded: loaded (/lib/systemd/system/ssh.socket; enabled; preset: enabled)
Active: active (running) since Fri 2022-10-21 23:08:09 UTC; 1min 24s ago
Until: Fri 2022-10-21 23:08:09 UTC; 1min 24s ago
Triggers: ● ssh.service
Listen: [::]:22 (Stream)
Tasks: 0 (limit: 18899)
Memory: 4.0K
CPU: 418us
CGroup: /system.slice/ssh.socket
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1993869/+subscriptions
More information about the foundations-bugs
mailing list