Make a SSH connection to REMOTE from LOCAL:

LOCAL# ssh -i /data/ssh/replication

2 errors are displayed :
– Could not create directory ‘/root/.ssh’.
– Failed to add the host to the list of known hosts (/root/.ssh/known_hosts).

To fix this a did:
LOCAL# mount -uw /
LOCAL# mkdir -p /root/.ssh/
LOCAL# chmod 700 /root/.ssh
LOCAL# nano /root/.ssh/known_hosts
LOCAL# ssh -i /data/ssh/replication

No errors like above on your display (hopefully :D)

REMOTE# exit
LOCAL# mount -ur /

sumber : (https://forums.freenas.org/index.php?threads/replication-setting-up-ssh-key-based-authentication.2480/)