docs icon indicating copy to clipboard operation
docs copied to clipboard

MacOS 12+ - Narrow Host definition in .ssh/config

Open ChrisKeefe opened this issue 2 years ago • 2 comments

Code of Conduct

What article on docs.github.com is affected?

Generating a new SSH Key...

What part(s) of the article would you like to see updated?

Environment

Adding the recommended directive to ~/.ssh/config breaks other necessary SSH connections on my company-managed Macbook running MacOS 12 (Monterey)

BREAKING:

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519

OK:

Host github.com
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519

Restricting the recommended new behavior to Host github.com allows both connections to proceed as expected. As a general principle, recommending more tightly-scoped Host settings might be a safer bet.

Additional information

No response

ChrisKeefe avatar Oct 14 '22 04:10 ChrisKeefe

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

welcome[bot] avatar Oct 14 '22 04:10 welcome[bot]

@ChrisKeefe Thank you for opening an issue and linking it to your PR! ✨

cmwilson21 avatar Oct 14 '22 14:10 cmwilson21

Closing this as I believe the merged PR fixes it 💖

cmwilson21 avatar Nov 08 '22 21:11 cmwilson21