Re:Show HN: S – a tool for ssh like z for cd
by dhagz on Sunday March 01, 2015 @08:06PM
(#9129746)
Are there any resources you recommend on maintaining a .ssh folder? I've done a little reading, but I've never really needed to worry about working with multiple servers before, but I'm going to need to learn soon for a project at work.
[ Parent
| on HN ]
Re:Show HN: S – a tool for ssh like z for cd
by voltagex_ on Sunday March 01, 2015 @09:29PM
(#9130003)
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=7658459
Some stuff changed in OpenSSH 6+ so read the manpages, too.
Re:Show HN: S – a tool for ssh like z for cd
by bdarnell on Sunday March 01, 2015 @09:58PM
(#9130100)
There 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.
I 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.
Re:Show HN: S – a tool for ssh like z for cd
by jethro_tell on Monday March 02, 2015 @12:28AM
(#9130441)
Also ignore any private keys. For security, but also each host should have a different key so you can burn one without burning them all.