Remix.run Logo
skydhash 3 days ago

> 1. Remembering multiple hostnames and keys in a centralized location

There’s ssh_config(5) for that.

gausswho 3 days ago | parent [-]

This may be tinfoil, but this is the kinda configuration that I want version controlled, and I've never felt good about adding ~/.ssh/config (or anything within ~/.ssh) to my dotfiles because I definitely do not want its siblings in version control. And I don't trust myself not to bone myself.

Instead I have some files elsewhere that I source into my terminal on start, containing:

export M4MINI=192.168.1.204

Attrecomet 13 hours ago | parent | next [-]

You can use "Include file/location" in your ~/ssh/config.

I don't understand, though, why you would not want to init a git repo in ~/ssh? What am I missing? It's not like "having version control" is the same as "upload it".

bravetraveler 2 days ago | parent | prev [-]

I'm pretty sure SSH wouldn't mind the config being a symlink to a file in your safely-held-elsewhere repository. Maybe I'm wrong. (m)DNS is what I'd really go for if I'm really just looking for easy access to names.

I wouldn't worry, but I also have the habit of adding things to the index explicitly. If I did worry: gitignore.

Attrecomet 13 hours ago | parent [-]

In fact, the symlink thing is exactly how we distribute the common ssh config as an included file within the team. The config is part of the infrastructure repo, and everyone gets a current version whenever they pull afresh.

I'm also not sure why version control on ssh config should be a problem, unless previous poster confuses version control and "send everything to the cloud".