Running on macOS, I see these available key algorithms:
$ ssh -V
OpenSSH_8.1p1, LibreSSL 2.7.3
$ ssh -Q key
ssh-ed25519
[email protected]
ssh-rsa
ssh-dss
ecdsa-sha2-nistp256
ecdsa-sha2-nistp384
ecdsa-sha2-nistp521
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
The only RSA algorithms are ssh-rsa
and [email protected]
.
However, if I set this in my .ssh/config
, there are no errors:
Host *
HostKeyAlgorithms rsa-sha2-512,rsa-sha2-256
But supplying garbage doesn't work, so these algorithms must be supported:
Host *
HostKeyAlgorithms foo
$ ssh whatever
/Users/scott/.ssh/config line 35: Bad key types 'foo'.
Why are the rsa-sha2-512
and rsa-sha2-256
algorithms supported but not reported by ssh -Q key
? Are there any other hidden algorithms that are supported? Is there any way to find them other than searching the source?
ssh -vv -oHostKeyAlgorithms=-ssh-rsa
still offers both rsa-sha2 methods -- plus [email protected] which is just as insecure as ssh-rsa but has a different name. Maybe you should post a question about your problem, although superuser might be more suitable than here.