I've finished preparing backports for the other Ubuntu releases (M,L,J,F) and used the following test procedure to validate each - packages are building in the private ~ubuntu-security PPA - since this is an Ubuntu internal issue I plan to just publish these along with an associated USN tomorrow unless anyone feels differently - let me know.
# get current status
systemctl is-enabled ssh.{service,socket} && systemctl is-active ssh.{service,socket} && echo "g-c-c should show active" || echo "g-c-c should show inactive"
# disable in GUI if enabled then check CLI has right output
gnome-control-center sharing
! systemctl is-enabled ssh.service && ! systemctl is-enabled ssh.socket && echo pass || echo fail
# check can't ssh locally
ssh localhost echo fail || echo pass
# now enable and activate just ssh.service
sudo systemctl disable ssh.{service,socket}
sudo systemctl enable ssh.service
sudo systemctl start ssh.service
ssh localhost echo pass || echo fail
# check is active in GUI
G_MESSAGES_DEBUG=all gnome-control-center sharing | grep 'Setting switch state for ssh.service: 1' && echo pass || echo fail
# then disable in GUI and check status on CLI
gnome-control-center sharing
! systemctl is-enabled ssh.service && ! systemctl is-enabled ssh.socket && echo pass || echo fail
# check can't ssh locally
ssh localhost echo fail || echo pass
I've finished preparing backports for the other Ubuntu releases (M,L,J,F) and used the following test procedure to validate each - packages are building in the private ~ubuntu-security PPA - since this is an Ubuntu internal issue I plan to just publish these along with an associated USN tomorrow unless anyone feels differently - let me know.
# get current status socket} && systemctl is-active ssh.{service, socket} && echo "g-c-c should show active" || echo "g-c-c should show inactive" center sharing
systemctl is-enabled ssh.{service,
# disable in GUI if enabled then check CLI has right output
gnome-control-
! systemctl is-enabled ssh.service && ! systemctl is-enabled ssh.socket && echo pass || echo fail
# check can't ssh locally
ssh localhost echo fail || echo pass
# now enable and activate just ssh.service socket}
sudo systemctl disable ssh.{service,
sudo systemctl enable ssh.service
sudo systemctl start ssh.service
ssh localhost echo pass || echo fail
# check is active in GUI DEBUG=all gnome-control- center sharing | grep 'Setting switch state for ssh.service: 1' && echo pass || echo fail
G_MESSAGES_
# then disable in GUI and check status on CLI center sharing
gnome-control-
! systemctl is-enabled ssh.service && ! systemctl is-enabled ssh.socket && echo pass || echo fail
# check can't ssh locally
ssh localhost echo fail || echo pass
# now enable ssh.socket socket}
sudo systemctl disable ssh.{service,
sudo systemctl enable ssh.socket
sudo systemctl start ssh.socket
ssh localhost echo pass || echo fail
# check is active in GUI DEBUG=all gnome-control- center sharing | grep 'Setting switch state for ssh.socket: 1' && echo pass || echo fail center sharing
G_MESSAGES_
# then disable in GUI and check status on CLI
gnome-control-
! systemctl is-enabled ssh.service && ! systemctl is-enabled ssh.socket && echo pass || echo fail
# check can't ssh locally
ssh localhost echo fail || echo pass
# finally enable in the gui and check the correct service/socket is active center sharing
gnome-control-
# reboot so we can check the correct service/socket is active
sudo reboot
series= $(lsb_release -cs) bionic| focal|jammy)
enabled=socket
disabled=service
case $series in
xenial|
enabled=service
disabled=socket
;;
esac
systemctl is-enabled ssh.$enabled && systemctl is-active ssh.$enabled && ! systemctl is-enabled ssh.$disabled && ! systemctl is-active ssh.$disabled && echo "pass" || echo "fail"
# finally check can ssh locally
ssh localhost echo pass || echo fail