SOLVED Rsync over SSH

Status
Not open for further replies.

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
I´m running FreeNAS 9.3, latest version.
Since a while back I´m running schedueled rsync tasks over ssh (push) to another FreeNAS box running the same version. Working great.

For the sake of not losing data, I run the tasks without the Delete option box ticked.
Then once in a while I tick the Delete box and run the job manually to cleanup old data.

Suddenly when trying to do this I get an error message:

In order to use rsync over SSH you need a user
with a public key (DSA/ECDSA/RSA) set up in home dir.

The user used for the task has a public key, of course. Running the tasks works fine, and ssh-ing to the remote host works fine also. No prompts or anything.

So what could this be?

My .ssh folder has 700 permissions, and my authorized_keys file has 644.
I´ve tried removing the authorized_keys file and adding the key via the FreenAS GUI, and I´ve tried removing the task and adding a new one. Same error.

Help would be greatly appreciated
 
D

dlavigne

Guest
That's interesting. What's the build version (from System -> Information)? Do you happen to remember how long it's been since it last worked (eg how many SU ago)?
 

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
The build is: FreeNAS-9.3-STABLE-201602031011

Can't really say when it worked last, it occurred last week. Probably a couple of months at least since last time.

I might have applied an update since then, not exactly sure.
 

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
Solved it!
I read somewhere that for rsync over ssh to work you need your public key in a .pub file in the ~/.ssh folder.
I simply created id_rsa.pub with my public key inside it. This on the machine running th rsync task.
So totally you seem to need three files in ~/.ssh on the host running the rsync task:
id_rsa (private key)
id_rsa.pub (public key matching the private key above)
authorized_keys (containing the public key matching the private key on the remote host)
Now it works.:)
However, the .pub file doesn´t seem necessary to run the task, only to create it. So, why is it needed?
Does anyone know? Am I missing something?
 
Status
Not open for further replies.
Top