fix: create the file if it doesn't exist
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
f 2023-05-20 12:26:41 -03:00
parent 5d34acde46
commit 5b120ed353

View file

@ -23,6 +23,8 @@ if ! grep -q "${SSH_ALIAS}" /root/.ssh/config ; then
echo " User ${SSH_USER}" >> /root/.ssh/config
fi
touch /root/.ssh/known_hosts
if ! ssh-keygen -F "[${SSH_SERVER}]:${SSH_PORT}"; then
echo "${SSH_KNOWN_HOSTS}" >> /root/.ssh/known_hosts
fi