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
### Keybase proof | |
I hereby claim: | |
* I am ashtonkem on github. | |
* I am ashton (https://keybase.io/ashton) on keybase. | |
* I have a public key whose fingerprint is 4762 CEAB 008B A1A2 CB5C DE10 8914 A885 B4DB 1D39 | |
To claim this, I am signing this object: |
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
update-ssh-config() { | |
rm ~/.ssh/config | |
echo "### This file is generated! Please check ~/.ssh/clean_config" > ~/.ssh/config | |
cat ~/.ssh/clean_config >> ~/.ssh/config | |
echo "### KNIFE NODES ###" >> ~/.ssh/config | |
knife search node "name:*" -a ec2.public_hostname | awk 'BEGIN {RS = "" ; FS = "\n" ; } { if (length(substr($1, 23, 1000)) != 0) {print "Host ", substr($2, 23, 1000) ;print " User akemerling" ;print " Hostname", substr($1, 23, 1000); print "" ;}}' | tail -n +1 >> ~/.ssh/config | |
} |