3 ms·
My set up dotfiles in a git repo (~/configs) with a Makefile that symlinks them to the correct location. I'm hoping someone chimes in with a bit of a better so
by voltagex_ 12y ago
My set up dotfiles in a git repo (~/configs) with a Makefile that symlinks them to the correct location.
I'm hoping someone chimes in with a bit of a better solution but there's no reason you couldn't have ~/.ssh/config symlinked in the same way.
Make sure you know which version/s of ssh you'll be dealing with and make the config work with the lowest version
Some HN articles/discussions:
https://news.ycombinator.com/item?id=4677049 https://news.ycombinator.com/item?id=4677049
https://news.ycombinator.com/item?id=7658459 https://news.ycombinator.com/item?id=7658459
Some stuff changed in OpenSSH 6+ so read the manpages, too.
- bdarnell 12y agoThere is actually a reason you can't have ~/.ssh/config symlinked the same way: ssh refuses to read a symlink for this file (for security purposes it is strict about the file type and permissions). My workaround is to copy the file instead of symlinking in my dotfile-setup script.
- voltagex_ 12y agoOops! Thanks for the clarification
- wampus 12y agoI version control the entire directory (ignoring the known_hosts file) somewhere like ~/config/ssh and symlink it to ~/.ssh. It contains a Makefile with a target that runs this command: ln -s ${PWD} ~/.ssh Just make sure the directory is chmod 700 and the important files in it are chmod 600.
- jethro_tell 12y agoAlso ignore any private keys. For security, but also each host should have a different key so you can burn one without burning them all.