From: W-Mark Kubacki Date: Wed, 15 Oct 2014 11:52:30 +0000 (+0200) Subject: launcher: Check for ECDSA, ED25519 keys for SSH as well as CoreOS' location. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=841334d9dd1432b36f7ede2ea042ff5b3c9b19c8;p=discourse_docker.git launcher: Check for ECDSA, ED25519 keys for SSH as well as CoreOS' location. --- diff --git a/launcher b/launcher index 56742d2..3bf9f8d 100644 --- a/launcher +++ b/launcher @@ -129,15 +129,18 @@ fi get_ssh_pub_key() { local ${ssh_key_locations} ssh_key_locations=( + ~/.ssh/id_ed25519.pub + ~/.ssh/id_ecdsa.pub ~/.ssh/id_rsa.pub ~/.ssh/id_dsa.pub + ~core/.ssh/authorized_keys ) local $keyfile for keyfile in "${ssh_key_locations[@]}"; do if [[ -e ${keyfile} ]] ; then ssh_pub_key="$(cat ${keyfile})" - return 1 + return 0 fi done @@ -154,11 +157,11 @@ get_ssh_pub_key() { mkdir -p ~/.ssh && ssh-keygen -f ~/.ssh/id_rsa -t rsa -N '' echo ssh_pub_key="$(cat ~/.ssh/id_rsa.pub)" - return 1 + return 0 fi fi - return 0 + return 1 }