Rsync over ssh

Status
Not open for further replies.

James S

Explorer
Joined
Apr 14, 2014
Messages
91
I would like to set up rsync using the FreeNAS 11 u4 GUI. The job is to pull data from an Ubuntu 16.04 server to the FreeNAS server. I've spent quite some time with the user guide and various posts on here. However I'm missing something -- the guide seems to emphasize setting the job up as push -- and so there is no mention of private key locations on the NAS (which seem essential for a pull?). I'm also getting similar error as above i.e., "In order to use rsync over SSH you need a user . . . "

The two systems are:
- FreeNAS 11 u4 and Ubuntu 16.04
The setup and tests so far is:
- User "backup2" is setup on both systems
- I can SSH into the Ubuntu system as the user and write to the directory (i.e., /var/www/html)
- The private key of user backup2 is on the Ubuntu system
- The public key of user backup2 is on the FreeNAS (pasted in via the GUI as one line)
- I've attempted to add the public key of the FreeNAS to the knownhosts on the Ubuntu
- An rsync task is configured via the GUI - when I go to close the task setup window I get the error message about rsync needing a user. Clearly, I guess, this is not the underlying problem? (Since there is a public key pasted to the user selected in the GUI.)

I would be grateful if someone could specify the key locations and any tests to systematically to get this work.
Thanks!
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
If the task is going to be initiated from the FreeNAS machine then the private key needs to be there as well. This doesn't switch ef it's push or pull as it's still the FN box that makes the connection.

Also, knownhosts is for identifying servers that you trust. This will be managed automatically by ssh when you connect. What you want to do is put the public key in the ~backup2/.ssh/authorized_keys file.

You should then be able to ssh to the Ubuntu box without entering a password.
 
Status
Not open for further replies.
Top