SSH keys and GitHub

Show and copy your public SSH key

Print your public SSH key and copy it, ready to paste into GitHub or a server.

  1. Show it
    Terminal
    cat ~/.ssh/id_ed25519.pub

    It starts with ssh-ed25519. No such file? Generate a key first.

  2. Copy it
    Terminal
    pbcopy < ~/.ssh/id_ed25519.pub
  1. Show it, then copy it from the terminal
    Terminal · Ubuntu / Debian
    cat ~/.ssh/id_ed25519.pub

    It starts with ssh-ed25519. No such file? Generate a key first.

  1. Show it
    PowerShell
    Get-Content "$env:USERPROFILE\.ssh\id_ed25519.pub"

    It starts with ssh-ed25519. No such file? Generate a key first.

  2. Copy it
    PowerShell
    Get-Content "$env:USERPROFILE\.ssh\id_ed25519.pub" | Set-Clipboard