Putting this here as I always forget the commands when I need them! For more details see Gerts blog post linked below.

Commands

Create new ed25519 keys:

ssh-keygen -o -a 100 -t ed25519

Create secure rsa keys:

ssh-keygen -t rsa -b 4096 -o -a 100

Find all keys on your system:

for keyfile in ~/.ssh/*.pub; do ssh-keygen -l -f "${keyfile}"; done | uniq

Change or add passphrase to existing keys:

ssh-keygen -f ~/.ssh/id_rsa -p -o -a 100

Start ssh agent on headless server:

exec ssh-agent bash

https://blog.g3rt.nl/upgrade-your-ssh-keys.html

Upgrading SSH Keys
Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.