3 ms·
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?
by deanclatworthy 13y ago
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?
- pmh 13y agoI 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 https://github.com/markhellewell/sshconfigfs
- datr 13y agoI'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. [1] https://launchpad.net/dotdee https://launchpad.net/dotdee
- batuhanicoz 13y agoI think storm[0] is what you are looking for. [0] https://github.com/emre/storm https://github.com/emre/storm
- SnacksOnAPlane 13y agoHere'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.
- lexandstuff 13y agoAside from the ones already mentioned, there's a library called dot-ssh-config[1] that is useful for generating SSH configs. [1] https://github.com/aelse/dot-ssh-config https://github.com/aelse/dot-ssh-config