I need a how-to to regenerate my ssh key to access old and new Linux servers

Using: Manjaro Stable

After the last update 2021-10-08 I lost access to some old legacy servers (Debian 6) using my ssh key. My current key no longer works on Debian 6 but it does work on Ubuntu 20.04.

Is there a “how to” for regenerating an ssh key that works with both new (Ubuntu 20.04) and old (Debian 6) servers?

:: I am in the process of upgrading that Debian server but it is not going to be as soon as I would like.

Using the suggestion doesn’t work:


That wiki suggest this but not how to do it:

generate new keys using a more secure algorithm like ED25519


Most simply:

ssh-copy-id account@host

See the man pages for available parameters. I don’t know what parameters are guaranteed to work with both Ubuntu 20.04 and Debian 6. For instance, if you specify the encryption used (e.g., ssh-keygen -t ed25519) that may work for one but not the other. Good luck!

1 Like

The arch wiki is often helpful.


1 Like

Also it is possible to use more then one key at the same time.

For example with ssh-agent this is easy. There you add 2, 3 or 5 keys to your agent. When you then use ssh, your agent will try one key after the other until he succeeds

Or you could use a config file in your .ssh dir. There you can specify per IP or per Host what key has to be used.

1 Like