If it’s this, it can be ruled out very quickly by:
dnf remove network-scripts
since this legacy package can be installed although shouldn’t be by default. This package doesn’t exist in Rocky 9 though.
That said network.service doesn’t exist in this package anyway, so shouldn’t be related to this. I would be more inclined to check for the existence of /usr/lib/systemd/system/sshd.service and check the entire content of this file, and perhaps also do:
find /etc/systemd -iname sshd.service
and check that the results shows a symlink to the /usr/lib/systemd/system/sshd.service file using ls -l
, or whether it’s a copy of the sshd.service that may have been edited/played around with.
No packages from doing a dnf repoquery search shows as providing network.service so it sounds like an incorrectly formatted sshd.service file.