fix: create the file if it doesn't exist
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
5d34acde46
commit
5b120ed353
1 changed files with 2 additions and 0 deletions
|
@ -23,6 +23,8 @@ if ! grep -q "${SSH_ALIAS}" /root/.ssh/config ; then
|
||||||
echo " User ${SSH_USER}" >> /root/.ssh/config
|
echo " User ${SSH_USER}" >> /root/.ssh/config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
touch /root/.ssh/known_hosts
|
||||||
|
|
||||||
if ! ssh-keygen -F "[${SSH_SERVER}]:${SSH_PORT}"; then
|
if ! ssh-keygen -F "[${SSH_SERVER}]:${SSH_PORT}"; then
|
||||||
echo "${SSH_KNOWN_HOSTS}" >> /root/.ssh/known_hosts
|
echo "${SSH_KNOWN_HOSTS}" >> /root/.ssh/known_hosts
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue