Sync bash aliases and ssh keys across devices
Sync bash aliases and ssh keys across devices
How do you guys quickly sync your settings (especially bash aliases and ssh keys) across your machines?
Ideally i want a simple script to run on every new server I work with. Any suggestions?
You're viewing a single thread.
Baron Von J @lemmy.world
I suggest you don't sync SSH keys. That's just increasing the blast radius of any one of those machines being compromised.
44 0 ReplyRegalPotoo @lemmy.world
Exactly this. Don't move private keys between machines. Generate them where you need them, it's not like they cost anything
10 0 ReplyTheButtonJustSpins @infosec.pub I mean, you want to copy the public keys that represents your machines, right?
3 0 ReplyBaron Von J @lemmy.world
Fair point, but I would equate that with syncing the authorized_keys file rather than thinking about how to sync the keys.
4 0 Reply
wmassingham @lemmy.world Right. Use some kind of centralized authentication like freeipa.
For bash aliases, I just pull down a .bashrc from github gists.
3 1 ReplyPHLAK @lemmy.world
OP should just generate a unique SSH key per device (+ user).
11 1 ReplyMuddybulldog @mylemmy.win
Agreed. I’ve probably got 100 keys registered with GitHub and 98 of them the private key is long destroyed due to OS reinstalls or whatnot. Format machine, new key. New machine, new key.
4 0 ReplyPHLAK @lemmy.world
FYI: You can remove the old keys from GitHub.
1 0 ReplyMuddybulldog @mylemmy.win
I like to save them for a rainy day when I need an OCD fix.
1 0 Reply
dm_me_your_feet @lemmy.world I d rather have 2 to 3 (for critical, mid, and test systems) ssh keys that are regularly rotated than 1 key per machine. I m not gonna balance 50 ssh keys; neither enter my password every time i jump hosts.
2 0 Reply
mFat @lemdro.id OP Is the url is easy to rember?
2 1 Reply