fix: SSH file permissions
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Andreas Mieke 2023-12-29 13:17:17 +01:00
parent ecdecec5c6
commit 4e2763d775

View file

@ -1,6 +1,9 @@
#!/bin/sh #!/bin/sh
mkdir -p /root/.ssh mkdir -p /root/.ssh
chmod 800 /root/.ssh
echo "${PLUGIN_SSH_KEY}" > "/root/.ssh/id_rsa" echo "${PLUGIN_SSH_KEY}" > "/root/.ssh/id_rsa"
chmod 600 /root/.ssh/id_rsa
echo "${PLUGIN_SSH_KNOWN_HOSTS}" > "/root/.ssh/known_hosts" echo "${PLUGIN_SSH_KNOWN_HOSTS}" > "/root/.ssh/known_hosts"
chmod 600 /root/.ssh/known_hosts
scp -B ${PLUGIN_EXTRA_FLAGS} ${PLUGIN_SOURCE} ${PLUGIN_DESTINATION} scp -B ${PLUGIN_EXTRA_FLAGS} ${PLUGIN_SOURCE} ${PLUGIN_DESTINATION}