KeyChain ISSUE : sequoia os x always requires an `ssh-add --apple-use-keychain with key path` after rebooting not holding the key in identity for ssh-agent

I need to know how can you permanently store ssh private key to keychain? Therefore upon reboot ssh-agent can detect key. Another word "ssh-add -apple-use-keychain ~/.ssh/mykey" which is private key, command work and key is loaded to identity. Then after reboot identity clear, it seem like keychain not holding the ssh key, as it getting replaced by password app. On top of it, creating config file under ~.ssh/config location with creating ~/.zshrc and having below information doesn't work. Also for legal reason Apple change from the bash shell to Zsh shell, see url Use zsh as the default shell on your Mac - Apple Support. In addition changing from bash shell to zsh shell, none of the script from bash, to config file or zsh seem to auto load. So created the plist but that doesnt' work either.


config file info

---------------

Host *

AddKeysToAgent yes

UseKeychain yes

IdentityFile ~/.ssh/mykey



.zshrc file info

---------------

#!/bin/zsh

ssh-add --apple-load-keychain &> /dev/null




FYI None of the below command don't work

-----------------------------------------------------

-K, -A or --apple-use-keychain, --apple-load-keychain


Mac mini, macOS 15.6

Posted on Sep 4, 2025 8:34 PM

Reply
1 reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

KeyChain ISSUE : sequoia os x always requires an `ssh-add --apple-use-keychain with key path` after rebooting not holding the key in identity for ssh-agent

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.