.ssh/config: “Bad configuration option: UseKeychain” on Mac OS Sierra 10.12.6

前端 未结 6 1130
长发绾君心
长发绾君心 2020-12-22 23:25

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

相关标签:
6条回答
  • 2020-12-22 23:51

    I just commented out the line and scp/ssh started working for me again.

    0 讨论(0)
  • 2020-12-22 23:54

    Instead of ssh-add type ‘open .ssh/id_rsa’ and add it to the keychain

    The UseKeychain option never appeared as bad on my config, but I have in the beginning, before any other host, the following

    Host *
    UseKeychain yes 
    
    Host (...)
    
    0 讨论(0)
  • 2020-12-22 23:58

    The accepted answer helped me but did not completely solve my problem because I had multiple options that were bad. Here is an example of what it might look like if you have this issue:

    Host *
      IgnoreUnknown AddKeysToAgent,UseKeychain
      AddKeysToAgent yes
      UseKeychain yes
      IdentityFile ~/.ssh/id_rsa
    
    0 讨论(0)
  • 2020-12-22 23:58

    It's the capital -K try lowercase -k!!

    ssh-add -k ~/.ssh/id_rsa
    
    Enter passphrase for /Users/tom/.ssh/id_rsa:
    Identity added: /Users/tom/.ssh/id_rsa (/Users/tom/.ssh/id_rsa)
    
    0 讨论(0)
  • 2020-12-23 00:04

    I had the same issue and i realized that when started to generate the key by following the instructions. The first step is this.

    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
    

    I didn't change the email address but of course I have forgotten to do that :D. So make sure to not forget that step and all will be fine.

    0 讨论(0)
  • 2020-12-23 00:15

    Try to specify another option, namely IgnoreUnknown like below:

    Host *
      IgnoreUnknown UseKeychain
      UseKeychain yes
    

    You can find more info about this here.

    If you already have an IgnoreUnknown value, use comma seperated values

    Host *
      IgnoreUnknown AddKeysToAgent,UseKeychain
      AddKeysToAgent yes
      UseKeychain yes
    
    0 讨论(0)
提交回复
热议问题