SSH keys and ssh-agent
cheat sheet · OpenSSH 9.6 https://lab.dimsanych.ru/en/wiki/ssh-keys/Cheat sheet
-
ssh-keygen -t ed25519generate a pair -
ssh-copy-id user@hostinstall it on the server -
ssh-keygen -l -f key.pubfingerprint -
chmod 700 ~/.sshdirectory — owner only -
chmod 600 ~/.ssh/authorized_keyskey file — owner only -
ssh-add ~/.ssh/id_ed25519load into the agent -
ssh -i ~/.ssh/key -o IdentitiesOnly=yes hostuse a specific key