I'm using OpenSSH 8.9p1. I'm trying to connect to a git via SSH, and I'm getting

no matching host key type found. Their offer: ssh-rsa

I was able to fix the problem by adding the following to my ~/.ssh/config

Host git.host.net   
    User git
    PubkeyAcceptedAlgorithms +ssh-rsa
    HostkeyAlgorithms +ssh-rsa

But some places online call for using PubkeyAcceptedKeyTypes. What does this do? I don't even see documented in man ssh?


1 Answer 1


From the source code, the name is labeled as "deprecated" and "obsolete" and internally it does the same thing, setting sPubkeyAcceptedAlgorithms.

You can see the commit here for the intent.

upstream: Rename PubkeyAcceptedKeyTypes keyword to PubkeyAcceptedAlgorithms.

While the two were originally equivalent, this actually specifies the signature algorithms that are accepted. Some key types (eg RSA) can be used by multiple algorithms (eg ssh-rsa, rsa-sha2-512) so the old name is becoming increasingly misleading. The old name is retained as an alias.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .