sshd port migration is missing two config lines from jammy to kinetic
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Ubuntu) |
Fix Released
|
High
|
Steve Langasek | ||
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
The automatic migration script from jammy to kinetic generates a invalid file for sshd that systemd refuses to read. Manual addition of two lines is required for a functional sshd with a custom port.
This bug can be considered the opposite of https:/
$ lsb_release -rd
Description: Ubuntu Kinetic Kudu (development branch)
Release: 22.10
$ apt-cache policy openssh-server
openssh-server:
Installed: 1:9.0p1-1ubuntu6
Candidate: 1:9.0p1-1ubuntu6
Version table:
*** 1:9.0p1-1ubuntu6 500
500 https:/
100 /var/lib/
$ apt-cache policy systemd
systemd:
Installed: 251.4-1ubuntu6
Candidate: 251.4-1ubuntu6
Version table:
*** 251.4-1ubuntu6 500
500 https:/
100 /var/lib/
# Instructions
- Configure /etc/ssh/
- Upgrade to 22.10 with sudo do-release-upgrade -d
- Accept overwriting /etc/ssh/
- Attempt to ssh into the machine
# Expected behavior
systemd should listen on port 2222 and start sshd.
$ cat /etc/systemd/
[Socket]
ListenStream=
ListenStream=2222
$ systemctl status ssh.socket
● ssh.socket - OpenBSD Secure Shell server socket
Loaded: loaded (/lib/systemd/
Drop-In: /etc/systemd/
Active: active (running) since Thu 2022-09-29 02:08:56 EDT; 9min ago
Until: Thu 2022-09-29 02:08:56 EDT; 9min ago
Triggers: ● ssh.service
Listen: [::]:2222 (Stream)
Tasks: 0 (limit: 19047)
Memory: 8.0K
CPU: 923us
CGroup: /system.
Sep 29 02:08:56 daniel-desktop2 systemd[1]: Listening on OpenBSD Secure Shell server socket.
# Actual behavior
Port 2222 refuses any connection. Systemd fails to parse the automatically generated file:
$ systemctl status ssh.socket
● ssh.socket - OpenBSD Secure Shell server socket
Loaded: loaded (/lib/systemd/
Drop-In: /etc/systemd/
Active: active (listening) since Thu 2022-09-29 01:51:57 EDT; 16min ago
Until: Thu 2022-09-29 01:51:57 EDT; 16min ago
Triggers: ● ssh.service
Listen: [::]:22 (Stream)
Tasks: 0 (limit: 19047)
Memory: 8.0K
CPU: 982us
CGroup: /system.
Sep 29 01:51:57 daniel-desktop2 systemd[1]: Listening on OpenBSD Secure Shell server socket.
Sep 29 01:56:23 daniel-desktop2 systemd[1]: /etc/systemd/
$ cat /etc/systemd/
ListenStream=2222
# Analysis
The migration script must be missing the `[Socket]` line and the next one. sshd works after I added those two lines manually. Either the migration script never worked or systemd changed the syntax in the meantime.
---
ProblemType: Bug
ApportVersion: 2.23.0-0ubuntu2
Architecture: amd64
CasperMD5CheckR
DistroRelease: Ubuntu 22.10
MachineType: ASUSTeK COMPUTER INC. K30BF_M32BF_
Package: systemd 251.4-1ubuntu6
PackageArchitec
ProcKernelCmdLine: BOOT_IMAGE=
Tags: kinetic
Uname: Linux 6.0.0-060000rc7
UpgradeStatus: Upgraded to kinetic on 2022-09-29 (0 days ago)
UserGroups: N/A
_MarkForUpload: True
dmi.bios.date: 05/19/2017
dmi.bios.release: 4.6
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0704
dmi.board.
dmi.board.name: K30BF_M32BF_
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev X.0x
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.family: Desktop
dmi.product.name: K30BF_M32BF_
dmi.product.sku: SKU
dmi.product.
dmi.sys.vendor: ASUSTeK COMPUTER INC.
modified.
modified.
mtime.conffile.
mtime.conffile.
description: | updated |
tags: | added: socket-activation ssh |
tags: |
added: ssh-socket-activation removed: socket-activation ssh |
Changed in openssh (Ubuntu): | |
importance: | Medium → High |
Changed in openssh (Ubuntu): | |
status: | In Progress → Fix Committed |
tags: | removed: foundations-todo |
apport information