Skip to content

Instantly share code, notes, and snippets.

@ThinhPhan
Created August 4, 2023 04:35
Show Gist options
  • Save ThinhPhan/6533257f81bd9e32b8fc3ce162e097e1 to your computer and use it in GitHub Desktop.
Save ThinhPhan/6533257f81bd9e32b8fc3ce162e097e1 to your computer and use it in GitHub Desktop.
SSH Keys Cheatsheet Commands

Cheatsheet Commands for SSH Keys

Create

Checking

For checking the SSH keys are adding and working properly.

  • eval "$(ssh-agent -s)" - Check if SSH Agent is running
  • ssh-add ~/.ssh/private_keys - Add the Keys to SSH Agent (can add multiple keys at once)
  • ssh-add -l - Verify Keys Added to SSH Agent
  • ssh-copy-id user@remote.server.location - Copy Key to Remote Server
  • ssh-copy-id user@host.local - Copy Server Key to Host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment