Re:SSH Kung Fu
by deanclatworthy on Monday April 28, 2014 @03:49AM
(#7658722)
I've been doing this for a while now, but my file is now huge and it's cumbersome to edit. Is there no utility to mange that file?
[ Parent
| on HN ]
I've worked around this by creating a ~/.ssh/config.d directory and splitting my configuration out into multiple files (normally by project). I then use dotdee[1] to watch that directory and automatically rebuild ~/.ssh/config anytime there is a change.
I don't know of any, but one thing you can do is split up your config into multiple files and then use `cat` to combine them after making a change. There's also https://github.com/markhellewell/sshconfigfs
Re:SSH Kung Fu
by batuhanicoz on Monday April 28, 2014 @04:43AM
(#7658872)
I think storm[0] is what you are looking for.
Re:SSH Kung Fu
by SnacksOnAPlane on Monday April 28, 2014 @10:56AM
(#7660319)
Here's what I put in my .bashrc:
alias compile-ssh-config='echo -n > ~/.ssh/config && cat ~/.ssh/*.config > ~/.ssh/config'
alias ssh='compile-ssh-config && ssh'
Compiles all your ~/.ssh/*.config files into a single ssh config file. It's simple and stupid and seems to do the trick.
Re:SSH Kung Fu
by lexandstuff on Tuesday April 29, 2014 @12:03AM
(#7664873)
Aside from the ones already mentioned, there's a library called dot-ssh-config[1] that is useful for generating SSH configs.