Comment 10 for bug 1993478

Revision history for this message
msaxl (saxl) wrote :

slightly off-topic for those who find this before the 22.10 documentation:
https://discourse.ubuntu.com/t/sshd-now-uses-socket-based-activation-ubuntu-22-10-and-later/30189

This bug is about the postinst script not being able to convert (or keep) every configuration around.

In my case this is because the script is unable to parse ListenAddress with port. The script should understand this formats (quote from man sshd_config):

ListenAddress hostname|address
ListenAddress hostname:port
ListenAddress IPv4_address:port
ListenAddress [hostname|address]:port

only the first is supported (and [hostname|address] without port)
example of working statements
ListenAddress localhost
ListenAddress 127.0.0.1
ListenAddress [::1]
ListenAddress ::1

example of valid but not working statements:
ListenAddress localhost:2222
ListenAddress 0.0.0.0:2222
ListenAddress [::]:2222

When converting [::] I think BindIPv6Only=yes should be used, but that's another topic