SSH Legacy Host Config Generator
Paste the error SSH gives you when connecting to an old switch, router, NAS or firewall, and get the exact lines to add for that one host, without weakening SSH for everything else.
🔒 Runs entirely in your browser. Nothing you type is sent anywhere.
How to use it
- Try to connect as normal, for example
ssh admin@192.168.1.20, and copy the error. It usually looks likeno matching host key type found. Their offer: ssh-rsa,ssh-dss. - Paste it above with a short name for the device and its address.
- Copy the block into
~/.ssh/config(create the file if it doesn’t exist), then connect withssh old-switch, using your short name.
Prefer not to touch your config? Use the one-off command instead. It applies the same options to that single connection.
Why per host, not for everything
Modern OpenSSH turns off old algorithms such as ssh-rsa (SHA-1 signatures) and diffie-hellman-group1-sha1 because they’re weak. The safe fix is to re-enable them only for the device that needs them, which is what a Host block does. Adding them under Host * would weaken every connection you make.
The + in front of each value adds the old algorithm to OpenSSH’s defaults rather than replacing them, so the device can still use something stronger if it supports it.
Good to know
ssh-rsahere means the old SHA-1 signature, not RSA keys. Your RSA key still works with modern servers throughrsa-sha2-256andrsa-sha2-512. You only needssh-rsafor devices too old to support those.PubkeyAcceptedAlgorithmslets your own key log in to the old device. On OpenSSH older than 8.5 the same option is calledPubkeyAcceptedKeyTypes.- DSA (
ssh-dss) can’t be re-enabled on current OpenSSH. OpenSSH 10.0 removed it completely. If a device only offersssh-dss, update its firmware or use an older client kept just for it. - The real fix is updating the device. These settings are a workaround for kit you can’t update yet, ideally on a trusted local network.
FAQ
Is this safe to use with real hostnames and usernames? Yes. The page doesn’t send anything anywhere; the config is built by a small script running in your browser. You can even use it offline once the page has loaded.
Where is ~/.ssh/config on Windows?
For the built-in OpenSSH client it’s C:\Users\<you>\.ssh\config. The same lines work there.
I get a different error. The tool also handles “no matching key exchange method found”, “no matching cipher found” and “no matching MAC found”. If yours is something else, the SSH host key guide covers more cases.