removed dependency on known_hosts file

This commit is contained in:
2025-01-20 19:09:54 -05:00
parent 9586af2566
commit 421d5310ec
10 changed files with 56 additions and 19 deletions
+1 -2
View File
@@ -19,9 +19,8 @@ RUN apt-get update && apt-get install -y rsync openssh-client
COPY docker_dev/shared/id_rsa /root/.ssh/id_rsa
COPY docker_dev/shared/id_rsa.pub /root/.ssh/id_rsa.pub
COPY docker_dev/shared/known_hosts /root/.ssh/known_hosts
RUN chmod 600 /root/.ssh/id_rsa /root/.ssh/id_rsa.pub /root/.ssh/known_hosts
RUN chmod 600 /root/.ssh/id_rsa /root/.ssh/id_rsa.pub
# Shared Volumes
+3 -2
View File
@@ -72,10 +72,11 @@ Targets=
Targets="${Targets} cvtt@cloud21.cvtt.vpn:/opt/store/cvtt/md_archive/crypto"
Targets="${Targets} cvtt@hs01.cvtt.vpn:/works/cvtt/md_archive/crypto"
for tgt in ${Targets}
do
Cmd="/usr/bin/rsync -ahv ${Source} ${tgt}"
Cmd="/usr/bin/rsync -ahv"
Cmd+=" -e 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'"
Cmd+=" ${Source} ${tgt}"
echo $Cmd
eval $Cmd
done