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

Making ssh_config additions more sane #273

Open WonderWoofy opened 5 years ago

WonderWoofy commented 5 years ago

Currently the ssh_config additions do universal matching with a Host line, like this...

Host *

But if someone tries to share this config between machines where the kr isn't installed, or if they screw up the environment, taking kr out of the $PATH, users may face an issue they cannot easily debug (I know they should know how, but you're also offering binary packages).

So I propose changing the additions to look something like this...

Match exec "test -x $(which kr 2>/dev/null)"

The Match keyword in ssh_config is much more powerful, and sticking to builtins shouldn't slow things down too much at all. I've been using this for the past couple days with no adverse consequences, but if you don't agree with this idea that's totally fine.

Thanks for taking the time to read through this.

WonderWoofy commented 5 years ago

Oh, if you do truly want to stick with a discresionless universal match, it may be easier for those not familiar with the ssh_config if you used the following instead...

Match all

But with The Dude like wisdom, I'll add, "That's just like, my opinion man..."