Adding SSH Keys

August 15, 2025

Log into a remote machine without typing in a password.

  1. Generate New SSH Key (if needed)
ssh-keygen -t ed25519 -C "email@example.com"

  1. Start SSH Agent & Add Key
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

  1. Copy Public Key to Remote Machine
ssh-copy-id -i ~/.ssh/id_ed25519.pub me@server-ip-address

  1. Streamline with a Config File
    • Update (or Create): ~/.ssh/config
Host remote-machine
    HostName server-ip-address
    User me
    IdentityFile ~/.ssh/id_ed25519

  1. Test Connection (from Host)
ssh remote-machine