So lately I switched to ubuntu 22.04 and tried a fresh installation with mariadb. When trying to connect to the database server with dbeaver i got stuck with the message in Dbeaver:
Can’t initialize tunnel
Cannot establish tunnel to x.x.x.x:22
Cannot establish tunnel to x.x.x.x:22
Auth fail
Auth fail
Looking in the journal control I got this error message while trying to connect:
sshd[1260]: userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]
It turned out that I was still using a ssh-rsa key. Which is based on the RSA algorithm. To solve the problem I generated a ECDRSA key and added that to the authorized_keys on the new server.
Now I am able to login to the database server again with Dbeaver.
I had a similar problem and solved it by editing the /etc/ssh/sshd_config file
Adding this line: PubkeyAcceptedAlgorithms=+ssh-rsa
and reseting the service
sudo systemctl restart sshd