- Tell SSH to use the macOS Keychain
cat >> ~/.ssh/config <<'EOF' Host * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_ed25519 EOF - Save the passphrase in the Keychain once
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
Check it worked
- Check the key is loaded
ssh-add -l
- Add the key to the agent the first time you use it
cat >> ~/.ssh/config <<'EOF' Host * AddKeysToAgent yes EOFUbuntu Desktop already runs an SSH agent when you log in.
- Load it now
ssh-add ~/.ssh/id_ed25519
Check it worked
- Check the key is loaded
ssh-add -l
- Start the SSH agent automaticallyRun as administrator
Get-Service ssh-agent | Set-Service -StartupType Automatic Start-Service ssh-agent - Load your key (once; it's remembered)
ssh-add "$env:USERPROFILE\.ssh\id_ed25519"
Check it worked
- Check the key is loaded
ssh-add -l