Commit b5fd005b authored by Michał 'rysiek' Woźniak's avatar Michał 'rysiek' Woźniak
Browse files

bugfix: newlines in known_hosts

parent 9d336497
......@@ -15,12 +15,12 @@ if [ ! -e /etc/ssh/ssh_known_hosts ]; then
cat /etc/ssh/ssh_known_hosts.template > /etc/ssh/ssh_known_hosts
fi
echo " +-- adding local ECDSA pubkey from: /etc/ssh/ssh_host_ecdsa_key.pub"
echo "* $( cat /etc/ssh/ssh_host_ecdsa_key.pub )" >> /etc/ssh/ssh_known_hosts
echo -e "\n* $( cat /etc/ssh/ssh_host_ecdsa_key.pub )" >> /etc/ssh/ssh_known_hosts
# if SSH_KNOWN_HOSTS is nonempty, let's add that to ssh_known_hosts
if [ ! -z ${SSH_KNOWN_HOSTS+x} ]; then
echo " +-- adding known hosts from SSH_KNOWN_HOSTS:"
echo -e "${SSH_KNOWN_HOSTS}"
echo -e "${SSH_KNOWN_HOSTS}" >> "/etc/ssh/ssh_known_hosts"
echo -e "\n${SSH_KNOWN_HOSTS}" >> "/etc/ssh/ssh_known_hosts"
fi
echo " +-- done."
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment