687
edits
Changes
Created page with "== Introduction == On macOS, you can set up such that your encrypted ssh keys get automatically decrypted using the passphrase stored in the Apple Keychain, which is unlocked..."
== Introduction ==
On macOS, you can set up such that your encrypted ssh keys get automatically decrypted using the passphrase stored in the Apple Keychain, which is unlocked at login.
== How to ==
=== Add your passphrase to the Keychain ===
Create your key as usual, then do this ''once'':
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
'''You ''must'' use the full path your key, a relative path ''will not'' work!'''
=== Configure ssh to use the Keychain to unlock your keys ===
Use this <code>~/.ssh/config</code>
Host *
IgnoreUnknown UseKeychain
UseKeychain yes
<code>IgnoreUnknown</code> is there so this config will work with non-Apple ssh implementation.
== References ==
* [https://apple.stackexchange.com/questions/48502/how-can-i-permanently-add-my-ssh-private-key-to-keychain-so-it-is-automatically How can I permanently add my SSH private key to Keychain so it is automatically available to ssh?]
* [https://developer.apple.com/library/archive/technotes/tn2449/_index.html Technical Note TN2449: OpenSSH updates in macOS 10.12.2]
On macOS, you can set up such that your encrypted ssh keys get automatically decrypted using the passphrase stored in the Apple Keychain, which is unlocked at login.
== How to ==
=== Add your passphrase to the Keychain ===
Create your key as usual, then do this ''once'':
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
'''You ''must'' use the full path your key, a relative path ''will not'' work!'''
=== Configure ssh to use the Keychain to unlock your keys ===
Use this <code>~/.ssh/config</code>
Host *
IgnoreUnknown UseKeychain
UseKeychain yes
<code>IgnoreUnknown</code> is there so this config will work with non-Apple ssh implementation.
== References ==
* [https://apple.stackexchange.com/questions/48502/how-can-i-permanently-add-my-ssh-private-key-to-keychain-so-it-is-automatically How can I permanently add my SSH private key to Keychain so it is automatically available to ssh?]
* [https://developer.apple.com/library/archive/technotes/tn2449/_index.html Technical Note TN2449: OpenSSH updates in macOS 10.12.2]