sorin-ionescu / prezto

The configuration framework for Zsh
MIT License
13.98k stars 4.49k forks source link

Add `ssh-add --apple-load-keychain` to `ssh` module #2027

Open aiguofer opened 1 year ago

aiguofer commented 1 year ago

I've been a longtime Linux user and I'm just moving over to Mac. I was having to enter my key passphrase every time I logged in. After some searching I figured out I needed to enable some configs in .ssh/config and add the key using ssh-add --apple-use-keychain <path_to_key>, but it took me a lot more searching to find I needed to add ssh-add --apple-load-keychain -q to my .zshrc.

Since the ssh module is already loading my keys, it'd be nice if it could load the keys from the MacOS keychain in the process. The only thing that complicates this a bit is that it seems the command is different for different MacOS versions, or maybe this is only needed since Ventura.