Write Ahead Log (WAL) Archiving, or Log Shipping, is the process of sending transaction log files from the PRIMARY host either to one or more STANDBY hosts or to be archived on a remote storage device for later use, e.g. PITR. There are several utilities that can copy WALs including, but not limited to, cp, scp, sftp, and rynsc. Basically, the server follows a set of runtime parameters which defines when the WAL should be copied using one of the aforementioned utilities. Rationale: Unless the server has been correctly configured, one runs the risk of sending WALs in an unsecured, unencrypted fashion.
Change parameters and restart the server as required. Note: SSH public keys must be generated and installed as per industry standards. References: https://www.postgresql.org/docs/12/static/runtime-config-wal.html#RUNTIME-CONFIG-WAL-ARCHIVING https://linux.die.net/man/1/ssh-keygen https://linux.die.net/man/1/rsync