diff options
Diffstat (limited to 'scripts/firstrun/02-ssh-common')
-rw-r--r-- | scripts/firstrun/02-ssh-common | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/firstrun/02-ssh-common b/scripts/firstrun/02-ssh-common new file mode 100644 index 0000000..140970b --- /dev/null +++ b/scripts/firstrun/02-ssh-common @@ -0,0 +1,25 @@ +# 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 + git.fedorahosted.org +EOFOUT +# git.fedorahosted.org ~ fedorahosted.org |