diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2013-05-10 15:37:40 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2013-05-10 15:39:34 +0200 |
commit | 2c3140dd57f7e992ba7fc386f911588bac980f08 (patch) | |
tree | 3efdcaa0e36a739ecaabb5916880f86ac8622612 /scripts/firstrun/02-ssh-common | |
parent | 821d676bc53d35e431b2f27b302d7f7f747a3460 (diff) | |
download | dotfiles-2c3140dd57f7e992ba7fc386f911588bac980f08.tar.gz dotfiles-2c3140dd57f7e992ba7fc386f911588bac980f08.tar.xz dotfiles-2c3140dd57f7e992ba7fc386f911588bac980f08.zip |
Init scripts: SSH: count git.fedorahosted.org in
and fix the name of the respective file
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
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 |