I might jump in here.
sudo apt-get update
sudo apt-get upgrade openssh-server
as stated by rootzoll (nprofile…l2uc) is correct. The bug has been fixed in the latest Debian openssh-server package. Which means this package has to be upgraded.
(The first command "apt-get update" just fetches the newest package list).
https://security-tracker.debian.org/tracker/CVE-2024-6387