Hi there,
I was trying to do this last night on a freshly installed FREENAS to experiment with the replication process on the same machine. I think the problem appears when the SSH service has not yet been started and you try to setup the replication task.
You will get the error message when trying to request the SSH key by pressing the "SSH Key Scan" button.
To sum up, you must follow the following steps:
1) Have 2 volumes on the same machine, one containing your data ( The source), the other (The destination) to receive the dataset from the first volume (The source).
2) Have a "Periodic snapshot task" enabled for (The source).
3) Have SSH service enabled (ON).
4) Under Storage, ZFS Replication tab, select "Add Replication".
5) Under "Volume/Dataset:" Select the Volume or dataset from (The source) you have a "Periodic Snaptshot Task" enabled.
6) Under "Remote ZFS Volume/Dataset:", enter the name of (The destination), or (The destination/with a name). It can be the volume itself or a dataset withing the volume. The Volume will be created with the name you provide.
(The source) will then be replicated under the volume or the dataset you selected. (The volume has to be created first, while the dataset can be created by the replication process.)
7) Select "Recursively replicate and remove stale snapshot on remote side:", or not.
8) A waring/supplement about "Initilize remote side for once. (May cause data loss on remote:". It seems it only affects the destination dataset that (The source) try to write to. For instance, it seems the volume can contain other dataset, but these are not going to be erased during replication. So you can have several replicated dataset on the destination volume and they will not be affected by this option unless the destination/dataset matches the one on the destination. (ie: destination contains apples, pears, and banana dataset) and I want to replicate only the banana dataset, then apple and pears should not be affected by the replication initialization. It think it is worth mentioning.
9) Under "Remote hostname" write localhost or the IP address of the FREENAS computer you are working on. I believe you can also write the Hostname of the FREENAS system provided under Network- Global configuration Tab.
10) Press the "SSH Key Scan" button, and if it is working, the "Remote hostkey:" window above should have a series of ssh-rsa data.
The data should contain the localhost, IP address or Hostname of the system followed by ssh-rsa and the key that follows. Further down the list, you should have localhost, IP address or Hostname of the system followed by ecdsa-sha2-nistp256 and the remaining of the key. Press "OK" when done.
11) Press the "View public key" and copy its content.
12) edit the user "root" and paste the key in the "SSH Public key:" window.
Then everything should be running as scheduled.
On a side note, it would seem that sometime the replication doesn't seem to work, when Replication Status always indicate "Sending". CPU can be mostly idled, but it does work.
If you have "Show console messages in the footer:" enabled, you should be able to see some message in the form of "cannot hold snapshot...." followed along the line by the name of a snapshot. This seems to occur about every minutes or so.
The way I see it, if a snapshot is already present on the destination volume/dataset, replication skips it and jump to the next snapshot. You should be able to see it but it is a slow process as it seems.
At this point I have not been able to bypass or interrupt a running replication task. Does anybody have any idea on how to do it?
Sorry for the novel, but I hope this help.