2025-07-29

TIL: macos doesn't automatically store ssh keys until I do at least one ssh connection with that key.

reference: https://apple.stackexchange.com/questions/254468/macos-sierra-doesn-t-seem-to-remember-ssh-keys-between-reboots

So I have to set UseKeyChain yes and AddKeysToAgent yes options in ~/.ssh/config.

But this doesnt't work with git commit signing because commit signing is technically not a ssh connection. So I have to either

  1. manually call ssh-add --apple-load-keychain on startup

  2. use same ssh key for both commit signing & remote access