Created
July 2, 2015 14:27
-
-
Save thejmazz/5c2a4332f9821a9167d5 to your computer and use it in GitHub Desktop.
Short script for generating ssh config file.
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 | |
sshdir="$HOME/.ssh" | |
# All keys should end in _rsa with their respective lock ending in _rsa.pub | |
keys=`ls $sshdir | grep _rsa$` | |
# Clean old config | |
rm $sshdir/config | |
# Build new config | |
for key in $keys | |
do | |
echo IdentityFile $sshdir/$key >> $sshdir/config | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment