Last active
April 21, 2017 20:11
-
-
Save bylatt/9ddcc9e256d27adffa8e26cf183f8296 to your computer and use it in GitHub Desktop.
autoload ssh key when login macOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Not recommend | |
# clear key | |
ssh-add -K -d ~/.ssh/<key> | |
# add key | |
ssh-add -K ~/.ssh/<key> | |
# add script to automaticcally add key when login | |
curl -o ~/Library/LaunchAgents/ssh.add.a.plist https://raw.githubusercontent.com/jirsbek/SSH-keys-in-macOS-Sierra-keychain/master/ssh.add.a.plist | |
# Use this config instead | |
Host * (asterisk for all hosts or add specific host) | |
AddKeysToAgent yes | |
UseKeychain yes | |
IdentityFile <key> (e.g. ~/.ssh/userKey) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment