ssh-client: handle /etc/ssh/ssh_config

- disable ProxyCommand
- install the GlobalKnownHostsFile

https://bugzilla.redhat.com/show_bug.cgi?id=1086778
master
Harald Hoyer 2014-08-29 14:06:57 +02:00
parent 967cc19ab1
commit 8a203398ef
1 changed files with 9 additions and 1 deletions

View File

@ -41,7 +41,15 @@ inst_sshenv()


# Copy over root and system-wide ssh configs. # Copy over root and system-wide ssh configs.
[[ -f /root/.ssh/config ]] && inst_simple /root/.ssh/config [[ -f /root/.ssh/config ]] && inst_simple /root/.ssh/config
[[ -f /etc/ssh/ssh_config ]] && inst_simple /etc/ssh/ssh_config if [[ -f /etc/ssh/ssh_config ]]; then
inst_simple /etc/ssh/ssh_config
sed -i -e 's/\(^[[:space:]]*\)ProxyCommand/\1# ProxyCommand/' ${initdir}/etc/ssh/ssh_config
while read key val; do
[[ key != "GlobalKnownHostsFile" ]] && continue
inst_simple "$val"
break
done < /etc/ssh/ssh_config
fi


return 0 return 0
} }