Skip to content

Instantly share code, notes, and snippets.

@kibotu
Created June 4, 2024 08:56
Show Gist options
  • Save kibotu/daa82d4722eab0fff62b9df89ff6d7d0 to your computer and use it in GitHub Desktop.
Save kibotu/daa82d4722eab0fff62b9df89ff6d7d0 to your computer and use it in GitHub Desktop.
SSH Config to support multiple ssh keys

Add ed25519 ssh key to keychain with passphrase

ssh-add --apple-use-keychain ~/.ssh/id_ed25519

Modify ~/.ssh/config

Host *
    UseKeychain yes
    AddKeysToAgent yes
    IdentityFile ~/.ssh/id_ed25519
    IdentityFile ~/.ssh/id_rsa

Kill SSH Server on MacOS

sudo killall ssh-agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment