1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

create_keys.sh: only use -E md5 when available

Fixes #23
This commit is contained in:
Nicolas Viennot 2016-06-05 13:53:55 -04:00
parent b3c85faf3b
commit 033298c42c

View File

@ -4,7 +4,11 @@ gen_key() {
ks="${keytype}_"
key="keys/ssh_host_${ks}key"
if [ ! -e "${key}" ] ; then
if ssh-keygen --help 2>&1 | grep -e '-E ' > /dev/null; then
ssh-keygen -t ${keytype} -f "${key}" -N '' -E md5
else
ssh-keygen -t ${keytype} -f "${key}" -N ''
fi
return $?
fi
}