Compare commits

...

3 commits

Author SHA1 Message Date
f
5d34acde46 BREAKING CHANGE: deprecate alpine versions
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-05-20 12:06:00 -03:00
f
15d48f3d55 feat: known hosts 2023-05-20 12:05:39 -03:00
f
91958cf969 feat: forward ssh agent 2023-05-20 11:57:09 -03:00
3 changed files with 16 additions and 7 deletions

View file

@ -20,6 +20,3 @@ matrix:
ALPINE_VERSION:
- "3.18.0"
- "3.17.3"
- "3.16.5"
- "3.15.8"
- "3.14.10"

View file

@ -6,14 +6,25 @@ test -n "${BORG_PASSPHRASE}"
test -n "${DEST}"
test -n "${SSH_ALIAS}"
# Defaults
SSH_PORT="${SSH_PORT:-22}"
SSH_SERVER="${SSH_SERVER:-${SSH_ALIAS}}"
SSH_USER="${SSH_USER:-root}"
umask 077
DATE="$(date +%F)"
ORIG=/srv/data
if ! grep -q "${SSH_ALIAS}" /root/.ssh/config ; then
echo "Host ${SSH_ALIAS}" >> /root/.ssh/config
echo " Port ${SSH_PORT:-22}" >> /root/.ssh/config
echo " HostName ${SSH_SERVER:-${SSH_ALIAS}}" >> /root/.ssh/config
echo " User ${SSH_USER:-root}" >> /root/.ssh/config
echo "Host ${SSH_ALIAS}" >> /root/.ssh/config
echo " Port ${SSH_PORT}" >> /root/.ssh/config
echo " HostName ${SSH_SERVER}" >> /root/.ssh/config
echo " User ${SSH_USER}" >> /root/.ssh/config
fi
if ! ssh-keygen -F "[${SSH_SERVER}]:${SSH_PORT}"; then
echo "${SSH_KNOWN_HOSTS}" >> /root/.ssh/known_hosts
fi
ssh -fN ${SSH_ALIAS}

View file

@ -5,3 +5,4 @@ Host *
VerifyHostKeyDNS yes
HashKnownHosts yes
StrictHostKeyChecking ask
ForwardAgent yes