diff options
Diffstat (limited to 'scripts/firstrun')
-rw-r--r-- | scripts/firstrun/02-ssl-common | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/firstrun/02-ssl-common b/scripts/firstrun/02-ssl-common index 70be8cf..e29f875 100644 --- a/scripts/firstrun/02-ssl-common +++ b/scripts/firstrun/02-ssl-common @@ -1 +1,23 @@ +# fedora setup + +local host +local found + wget https://admin.fedoraproject.org/ssh_known_hosts -O ~/.ssh/fedora-known_hosts +while read host; do + found=$(grep $(dig +short "${host}") ~/.ssh/fedora-known_hosts) + if test -n "${found}"; then + chmod u+w ~/.ssh/config + cat >>~/.ssh/config <<EOF + +Host $host + HostKeyAlias $(echo "${found}" | cut -d, -f1) + IdentityFile ~/.ssh/fedora-id_rsa + UserKnownHostsFile /dev/null + GlobalKnownHostsFile ~/.ssh/fedora-known_hosts +EOF + chmod u-w ~/.ssh/config + fi +done <<-EOFOUT + fedorapeople.org +EOFOUT |