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

github.com is always an unknown host #290

Open brandonkal opened 4 years ago

brandonkal commented 4 years ago

Git push is painful with this app as it is always an unknown host. It has to be approved twice likely due to github's SSH load balancing.

There are other cases where the host appears to be unknown as well.

FernandoMiguel commented 4 years ago

Github has a known key It shouldn't be showing a different one per connection. Have you tried adding it to your known keys?

Personally I prefer to use github with https and personal tokens

brandonkal commented 4 years ago

This is a bug in Krypton. It always reports an ssh request to GitHub as an unknown host (twice)

For instance my development server is simply Dev

The push notification on my Android reads "dev @ unknown host" SSH request.

After git push, the Android app shows it in the logs as "git @ github.com"

The host is known on the server and pinned in the Krypton app.

agrinman commented 4 years ago

What’s the output of ssh git@github.com -vv

FernandoMiguel commented 4 years ago

for reference

debug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /Users/fernando/.ssh/known_hosts:5
[...]
debug1: Server accepts key: /Users/fernando/.ssh/id_krypton ED25519 SHA256:95QKUNIcIP9Ccj6L4Ot5XP7x/lFU85dI1E/jcy+Wyu4 explicit agent
Krypton ▶ Requesting SSH authentication from phone
Krypton ▶ Phone approval required. Respond using the Krypton app
Krypton ▶ Success. Request Allowed ✔
debug1: Authentication succeeded (publickey).
Authenticated to github.com (via proxy).
brandonkal commented 4 years ago

See now that I open this issue it starts mysteriously working. I'll keep this open for a while to see if this pops up again. Output is essentially what is above, i.e. Host 'github.com' is known.

brandonkal commented 4 years ago

I'm seeing a similar issue now with another host. When connecting with Forklift to a local server that is already known "dev" the phone prompts with "unknown host"

lekv commented 4 years ago

I'm also seeing this behavior with gitlab.com :(