Hey. I have set up an ssh file to automatically add ssh keys to an ssh agent. However, it is currently not working. He worked earlier. I updated the ssh key for the bitpack and it no longer works. When I reboot, I have to add the ssh key manually using the ssh-add -K option.
Can someone help me figure out why ssh config is not working? The AddKeysToAgent yes parameter enables the automatic addition of ssh keys.
I am running macOS Sierra 10.12.4
Here is the configuration (I changed the server names for sensitivity purposes)
GSSAPIAuthentication no
Host cik-bitbucket__com
HostName bitbucket.com
User cik
PreferredAuthentications publickey
IdentityFile /Users/cik/.ssh/cik-bitbucket__com
UseKeychain yes
AddKeysToAgent yes
Host *
UseKeychain yes
AddKeysToAgent yes
ServerAliveInterval 15
IdentityFile /Users/cik/.ssh/id_rsa
Host jenkins
HostName pasjenkins1.mycompany.com
UseKeychain yes
AddKeysToAgent yes
Host jenkinsqa
HostName pasjenkinsqa.mycompany.com
UseKeychain yes
AddKeysToAgent yes
Host artifactory
HostName prp01
UseKeychain yes
AddKeysToAgent yes
Host bitbucket
HostName bitbucket
UseKeychain yes
AddKeysToAgent yes
Host confluence
HostName confluence01
UseKeychain yes
AddKeysToAgent yes
Host jira
HostName jira01
UseKeychain yes
AddKeysToAgent yes
Host vagrant
HostName 127.0.0.1
Port 2222
User vagrant
IdentityFile /Users/cik/.vagrant.d/insecure_private_key
Host localhost
HostName 127.0.0.1
Port 2222
User vagrant
IdentityFile /Users/cik/.vagrant.d/insecure_private_key
Update:
Questions for the order.
It works
ssh-add -D
ssh-add -K /Users/cik/.ssh/cik-bitbucket__com
ssh-add
git push (Works)
Does not work
ssh-add -D
ssh-add
ssh-add -K /Users/cik/.ssh/cik-bitbucket__com
git push (Works)
source
share