← Back to search

Add SSH persistence

persistencelinuxchecklist

Summary

Authorize your SSH public key so you can reconnect without a password after initial access.

Walkthrough

Generate an ed25519 key pair and add the public key to authorized_keys for passwordless SSH re-entry.

Commands

bash

mkdir ~/.ssh
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ''
cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys