I am in the process of changing to using ipv6 addresses where i can.
I am using the create_cold_standby.sh script on an hourly schedule to keep a separate copy updated of my mailcow server on a VPS. The script is configured to use an ipv4 address and a random port open on my firewall, and worked flawlessly for a very long time.
After changing to ipv6 address and to port 22, I noticed that the script does not run correctly. it starts, but then after a long time, it times out.
The last message before timeout is: “Syncronizing mailcow base directory…”
To me, it seems an ipv6 address does not work with this command right after the message above:
rsync --delete -aH -e "ssh -o StrictHostKeyChecking=no \
-i \"${REMOTE_SSH_KEY}\" \
-p ${REMOTE_SSH_PORT}" \
"${SCRIPT_DIR}/../" root@${REMOTE_SSH_HOST}:"${SCRIPT_DIR}/../"
for the command to work, the ipv6 address needs to be in square brackets
I tried a few ways to escape the ipv6 address in the $REMOTE_SSH_HOST env variable to no avail.
Just to confirm, the ssh to the remote host works fine from the command line, and there is no VPN or overlay network to interfere with the connection.
Is anyone using this script with an ipv6 address successfuly?