SSH authorized_keys and rsync tasks

Status
Not open for further replies.

Petah

Cadet
Joined
Jul 11, 2013
Messages
7
When setting up my FreeNAS box to do a rsync pull over SSH, FreeNAS forces "StrictHostKeyChecking=yes"

So how can I setup an known host for the server I want to pull from?
 

panz

Guru
Joined
May 24, 2013
Messages
556
Your question is not clear (to me), would you mind elaborating it a bit?
 

Petah

Cadet
Joined
Jul 11, 2013
Messages
7
I have kinda fixed it. I had to ssh in umount, and chmod the known_hosts file.
 

panz

Guru
Joined
May 24, 2013
Messages
556
It's not a good idea to modify the default installation of FreeNAS. It's basically similar to an embedded system, and you get in trouble with updates/upgrades if you change something by writing to the default OS.

If you want to add a key to the known_hosts you've to simply copy & paste it to the User's settings in the WebGUI.
 

Petah

Cadet
Joined
Jul 11, 2013
Messages
7
I tried looking for how to do it in the GUI, and tried to find docs about setting up a public key etc, but I couldn't find any information.
 

panz

Guru
Joined
May 24, 2013
Messages
556
Section 4.5.3 of FreeNAS 9.1.0 guide reports all the procedures you need to do this.
 

Petah

Cadet
Joined
Jul 11, 2013
Messages
7
Section 4.5.3 of FreeNAS 9.1.0 guide reports all the procedures you need to do this.

To create the public/private key pair for the rsync user account, open Shell on PUSH. The / filesystem
must first be mounted as read-write. The following example generates an RSA type public/private key
pair for the root user. When creating the key pair, do not enter the passphrase as the key is meant to be
used for an automated task.
mount -o rw /
...

So this is basically what I did, yet you said it was not recommended. And also doing it this way led to the problem of cron not being able to write the known_hosts file.
 

panz

Guru
Joined
May 24, 2013
Messages
556
Sorry, I meant "don't do things the doc doesn't mention" :)

Please explain me what are you going to do with cron and why do you need to write to known_hosts _after_ the operations described in the manual.
 
Status
Not open for further replies.
Top