brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: ssh -Q lists the algorithms your SSH client supports

Network and access
~/tips/tip-ssh-q-list-algorithms

ssh -Q cipher

See which ciphers, key types and key exchanges your own ssh build can use.

When a server refuses with “no matching key exchange method”, the first question is what your own client can do. ssh -Q answers that without connecting anywhere.

You give it a feature name and it prints one algorithm per line:

ssh -Q cipher
ssh -Q kex
ssh -Q key

cipher lists the symmetric ciphers, kex the key exchange methods and key the key types. ssh -Q help prints every query term your version knows, which is handy because newer releases add a few. The man page also says any ssh_config keyword that takes an algorithm list works as an alias, so ssh -Q KexAlgorithms gives the same list as ssh -Q kex.

I like piping it through grep when I am checking for one specific thing, like post-quantum key exchange:

ssh -Q kex | grep -i mlkem

Compare that with what the server offers (the error message usually names it, or run ssh -v and read the kex lines) and you know which side is too old.

Keep in mind this is the list of what the client could use, not what it will offer by default. Some algorithms are compiled in but switched off in the default config. To see what ssh will really propose for a host, ssh -G hostname prints the effective kexalgorithms and ciphers lines.

Further reading: ssh man page

More Network and access tips scp -3 alice@server-a:/var/backups/db.sql.gz bob@server-b:/srv/restore/ tailscale exit-node suggest tailscale lock sign nodekey:1abddef1 tlpub:abcdef12 wg genpsk > peer1.psk Table = off All Network and access tips (163) All topics

Link