kryptco / kr

DEPRECATED A dev tool for SSH auth + Git commit/tag signing using a key stored in Krypton.
https://krypt.co/developers/
Other
1.59k stars 109 forks source link

How to configure local fallback #267

Open balupton opened 5 years ago

balupton commented 5 years ago

Sometimes krypton fails to connect, and it seems it now supports a local ssh key fallback, how do I configure which local ssh key it should use?

Krypton ▶ Requesting SSH authentication from phone
Krypton ▶ Request timed out. Make sure your phone and workstation are paired and connected to the internet and the Krypton app is running.
Krypton ▶ Falling back to local keys.
sign_and_send_pubkey: signing failed: agent refused operation
no such identity: /Users/balupton/.ssh/id_ed25519: No such file or directory
no such identity: /Users/balupton/.ssh/id_rsa: No such file or directory
no such identity: /Users/balupton/.ssh/id_ecdsa: No such file or directory
no such identity: /Users/balupton/.ssh/id_dsa: No such file or directory
git@github.com: Permission denied (publickey).
balupton commented 5 years ago

I guess it is this section of ~/.ssh/config right?

# Added by Krypton
Host *
    IdentityAgent ~/.kr/krd-agent.sock
    ProxyCommand /usr/local/bin/krssh %h %p
    IdentityFile ~/.ssh/customisethis
garandam commented 5 years ago

I have done this:

Edit ~/.ssh/config

Host github.com
    IdentityFile ~/.ssh/github.com/id_rsa

# Added by Krypton
Host *
    IdentityAgent ~/.kr/krd-agent.sock
    ProxyCommand /usr/local/bin/krssh %h %p
    IdentityFile ~/.ssh/id_krypton
    IdentityFile ~/.ssh/id_ed25519
    IdentityFile ~/.ssh/id_rsa
    IdentityFile ~/.ssh/id_ecdsa
    IdentityFile ~/.ssh/id_dsa
FernandoMiguel commented 5 years ago

that isnt a fallback... that is using your computer local key as primary, which defeats the purpose of having it only in the secure enclave of your phone

garandam commented 5 years ago

@FernandoMiguel thx, but for me, it works. It always uses my krypton key but I would assume that when it doesn't work it uses my other SSH-Key, because both are registered within GitHub & it matches the host within the config.