I am trying to configure my ssh configuration on Mac (Mac OS Sierra 10.12.6) so that it saves the passphrase for my ssh key in the keychain. I could have done this with
ssh-add -K ~/.ssh/id_rsa
But lately, it no longer works. Following this article, the behavior of the ssh configuration on Mac OS> 10.12.2 seems to have changed, and the recommended way to fix this problem is to add UseKeychain yesssh to your configuration. So here is my section .ssh/config Host *:
Host *
Port 22
ServerAliveInterval 60
ForwardAgent yes
IdentityFile ~/.ssh/id_rsa
AddKeysToAgent yes
UseKeychain yes
When I try to ssh to a third-party host, I get the following error message:
$ ssh my-host
/Users/USER/.ssh/config: line 16: Bad configuration option: usekeychain
Any idea why this is happening and how I can fix it? Thank!
source
share