使用 rsync 實現兩部完全一樣的 Asterisk 主機的 HA 方案。
On Master Box,同步方式:Master --push--> Slave)
建立公鑰及私鑰證書
# cd /root/.ssh # ssh-keygen -d Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): <確認路徑無誤,按 Enter> Enter passphrase (empty for no passphrase): <輸入證書的密碼> Enter same passphrase again: <確認密碼> Your identification has been saved in /root/.ssh/id_rsa. <這是私鑰> Your public key has been saved in /root/.ssh/id_rsa.pub. <這是公鑰> The key fingerprint is: 42:e6:6b:21:07:74:33:95:2c:b8:17:25:a2:53:0e:f8 root@pbx-master.local
將公鑰檔傳送到 Slave Box 的 /root/.ssh
資料同步測試指令
rsync