.ssh / config: "Bad setup: UseKeychain" on Mac OS Sierra 10.12.6

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!

+45
source share
5

, IgnoreUnknown,

IgnoreUnknown UseKeychain
UseKeychain yes

.

+88

, , , . , , :

Host *
  IgnoreUnknown AddKeysToAgent,UseKeychain
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa
+33

-K, -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)
+1

scp/ssh .

0

ssh-add ‘ .ssh/id_rsa

UseKeychain , , ,

Host *
UseKeychain yes 

Host (...)
0

Source: https://habr.com/ru/post/1689735/


All Articles