Created
May 17, 2017 13:14
-
-
Save sourcesimian/ca41f53e3f77df3b888c1c032d263250 to your computer and use it in GitHub Desktop.
Dropin folder to generate ~/.ssh/config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Put this script in a folder named ssh-config.d | |
# Add as many contributer files as you line to this folder | |
# They will be concatenated into ~/.ssh/config in lexical order | |
echo "### Auto generated by: $0 ###" >~/.ssh/config | |
for script in $(ls -1 $(dirname $0)/* | grep -v -e "$0" -e "~\$" ); do | |
echo "" >>~/.ssh/config | |
echo "# --- Origin: $script --- #" >>~/.ssh/config | |
cat $script >>~/.ssh/config | |
done | |
echo "~/.ssh/config updated from: $(dirname $0)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment