1Password on Mastodon

Difference to save the public key to config and known_hosts?

rstolperstolpe
Community Member

Hi,
I'm running 1password on my Mac and I'm wondering that's the real difference to edit the .ssh/config or .ssh/known_hosts for adding the public key?
For .ssh/config you describe it here in your article.
https://developer.1password.com/docs/ssh/agent/advanced/#match-key-with-host

Host github.com
IdentityFile ~/.ssh/public-key-downloaded-from-1password.pub
IdentitiesOnly yes

But if you write it in known_hosts you can write it like this:
github.com PUBLICKEYSTRING

So, what's the difference?


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser:_ Not Provided

Comments

  • Jack.P_1PJack.P_1P

    Team Member

    Hi @rstolpe:

    Great question. Configuring which public key to use for authentication is done in .ssh/config, whereas known_hosts is used for your device to verify that you're indeed connecting the server you expect.

    Jack

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file