AlmaLinux 9 - Error connect ssh

Dear,
I’m trying to connect from another server, with PHP over ssh with ssh2_connect.
When I try to connect to the AlmaLinux 9 server, it tells me: Unable to negotiate with 177.52.182.44 port 49820: no matching host key type found. Their offer: ssh-rsa,ssh-dss

I already tried to add the commands
PubkeyAcceptedAlgorithms +ssh-rsa
HostkeyAlgorithms +ssh-rsa

In the SSH configuration files, however, to no avail.
Does anyone know what this error could be and how to fix it?

Hi, try change rsa options to legacy connections,

https://almalinux.discourse.group/t/ssh-from-older-linux-versions-to-alma-linux-9/2315/8