Fix error on checking last line of ~/.ssh/config

This commit is contained in:
Gustavo Trott 2022-12-14 08:21:35 -03:00
parent c37e7f7ef2
commit 1c40a3c431

View File

@ -258,7 +258,7 @@ ssh-keyscan -H "$DOCKERIP" >> ~/.ssh/known_hosts
ssh-keyscan -H "$HOSTNAME" >> ~/.ssh/known_hosts
# ssh-keyscan -H [hostname],[ip_address] >> ~/.ssh/known_hosts
if [ ! -z $(tail -1 ~/.ssh/config) ] ; then
if [ ! -z "$(tail -1 ~/.ssh/config)" ] ; then
echo "" >> ~/.ssh/config
fi