Where to start First steps track · 15 stages
Linux Labs

SSH keys and ssh-agent

cheat sheet · OpenSSH 9.6 https://lab.dimsanych.ru/en/wiki/ssh-keys/

Cheat sheet

  • ssh-keygen -t ed25519 generate a pair
  • ssh-copy-id user@host install it on the server
  • ssh-keygen -l -f key.pub fingerprint
  • chmod 700 ~/.ssh directory — owner only
  • chmod 600 ~/.ssh/authorized_keys key file — owner only
  • ssh-add ~/.ssh/id_ed25519 load into the agent
  • ssh -i ~/.ssh/key -o IdentitiesOnly=yes host use a specific key
Loading…