Skip to content

Instantly share code, notes, and snippets.

@wchristian
Created April 16, 2012 10:55
Show Gist options
  • Save wchristian/2397756 to your computer and use it in GitHub Desktop.
Save wchristian/2397756 to your computer and use it in GitHub Desktop.
multi-homing ssh keys
12-04-16@12:44:16 (nrr) i use multiple identities all the time.
12-04-16@12:44:17 (nrr) https://github.com/nrr/dotfiles/blob/master/src/.ssh/config.d/config_zz-default
12-04-16@12:44:54 (@Mithaldu) i've only ever seen one key from you
12-04-16@12:45:48 (nrr) http://hastebin.com/tiroyapaqu.txt
12-04-16@12:46:08 (nrr) small sample of the identities i use for things.
12-04-16@12:47:05 (@Mithaldu) nrr: do you have multiple identities for the same target?
12-04-16@12:47:23 (nrr) Mithaldu: in some cases, yes, depending on the username i use.
12-04-16@12:48:08 (@Mithaldu) no, for the same username
12-04-16@12:48:52 (nrr) no, never.
12-04-16@12:48:53 (@Mithaldu) for said coworker this would mean he needs to use two different keys to use the internal git thinger
12-04-16@12:49:34 (nrr) mmm, no, don't think so. if he has one of those keys set up in gitolite (or whatever you guys use for access control), he can use just that one key if he so wants.
12-04-16@12:49:53 (@Mithaldu) though i guess i'm wrong considering that you CAN set up keys to load depending on target host
12-04-16@12:50:09 (nrr) yep.
12-04-16@12:50:13 (@Mithaldu) is that an inherent feature and you just configure it in your .ssh dir or does it require fucking around?
12-04-16@12:50:28 (nrr) https://github.com/nrr/dotfiles/blob/master/src/.ssh/config.d/config_zz-default <-- right here
12-04-16@12:50:38 (nrr) in particular, look at the IdentityFile lines.
12-04-16@12:50:47 (@Mithaldu) i see that
12-04-16@12:50:50 (@Mithaldu) doesn't mean it's inherent
12-04-16@12:50:54 (@Mithaldu) you KNOW linux
12-04-16@12:51:09 (@Mithaldu) those lines might come from the kernel or from some befunge plugin you install on every machine you use
12-04-16@12:51:10 (nrr) it's part of ssh.
12-04-16@12:51:25 (@Mithaldu) goody :)
12-04-16@12:51:30 (@Mithaldu) that's a neat solution then!
12-04-16@12:51:46 (nrr) yeah, it was one that i came up with when i started working at contegix.
12-04-16@12:52:00 (nrr) our way of managing several thousand machines required that i come up with something to help my sanity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment