.ssh/config:“错误的配置选项:UseKeychain"在Mac OS Sierra 10.12.6上 [英] .ssh/config: "Bad configuration option: UseKeychain" on Mac OS Sierra 10.12.6
问题描述
我正在尝试在Mac(Mac OS Sierra 10.12.6)上设置ssh配置,以使其将我的ssh密钥的密码存储在钥匙串中.以前我可以使用
I am trying to set up my ssh config on the Mac (Mac OS Sierra 10.12.6) in such a way that it stores the passphrase for my ssh key in the keychain. Previously I could do that with
ssh-add -K ~/.ssh/id_rsa
但是最近似乎不再起作用了.在这篇文章之后,似乎Mac OS> 10.12.2中的ssh配置,解决此问题的推荐方法是将UseKeychain yes
添加到您的ssh配置中.这是我的.ssh/config
部分Host *
:
But recently this doesn't seem to work anymore. Following this article there seems to be a change in the behaviour of the ssh config in Mac OS > 10.12.2 and the recommended way to fix this issue is to add UseKeychain yes
to your ssh config. So here's my .ssh/config
section the Host *
:
Host *
Port 22
ServerAliveInterval 60
ForwardAgent yes
IdentityFile ~/.ssh/id_rsa
AddKeysToAgent yes
UseKeychain yes
当尝试SSH到外部主机时,出现以下错误消息:
When trying to ssh to a foreign host, I get the following error message:
$ ssh my-host
/Users/USER/.ssh/config: line 16: Bad configuration option: usekeychain
任何想法为什么会发生这种情况以及如何解决?谢谢!
Any ideas why this happens and how I can fix it? Thanks!
推荐答案
尝试指定另一个选项,即如下所示的IgnoreUnknown
Try to specify another option, namely IgnoreUnknown
like below
IgnoreUnknown UseKeychain
UseKeychain yes
您可以在此处找到更多信息.
You can find more info about this here.
这篇关于.ssh/config:“错误的配置选项:UseKeychain"在Mac OS Sierra 10.12.6上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!