NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
azzkiker
Nov 01, 2013Aspirant
Rsync using SSH
Hello @ all,
i want to use my newly bought Readynas RN104 to Backup some of my data from a Synology Diskstation DS2413+.
To do this, i use rsync. The Readynas powers itself up, connects via rsync to Diskstation and copies newly modified files.
But now i like to change to a secure connection using SSH because i want to use internet for the task.
In the Web interface it's easy to select Rsync over SSH and export public rsa key.
I copied the public key to the Diskstation and tested SSH connection with keys on the console of the Readynas, which is working fine.
But i can't connect using Rsync. Again i tried using console and there seems to be a little problem with the connection path.
The Readynas saves the connection string like this: "xxx.xxx.xxx.xxx:/path" in the configuration file "/etc/frontview/backup_jobs.conf"
But the Diskstation wants to have a connection string like this: "xxx.xxx.xxx.xxx::path"
When creating a backup job not using SSH the connection string is correctly saved to "backup_jobs.conf", so it's clear why it is working with only using Rsync.
I did not find the module which is writing backup_jobs.conf. Can someone please tell me which file needs to be modified.
I'm not sure if the connection string the Diskstation wants or if the string the Readynas uses is the standard string. Possibly this can be updated in next firmware version.
Best regards
Jens
i want to use my newly bought Readynas RN104 to Backup some of my data from a Synology Diskstation DS2413+.
To do this, i use rsync. The Readynas powers itself up, connects via rsync to Diskstation and copies newly modified files.
But now i like to change to a secure connection using SSH because i want to use internet for the task.
In the Web interface it's easy to select Rsync over SSH and export public rsa key.
I copied the public key to the Diskstation and tested SSH connection with keys on the console of the Readynas, which is working fine.
But i can't connect using Rsync. Again i tried using console and there seems to be a little problem with the connection path.
The Readynas saves the connection string like this: "xxx.xxx.xxx.xxx:/path" in the configuration file "/etc/frontview/backup_jobs.conf"
But the Diskstation wants to have a connection string like this: "xxx.xxx.xxx.xxx::path"
When creating a backup job not using SSH the connection string is correctly saved to "backup_jobs.conf", so it's clear why it is working with only using Rsync.
I did not find the module which is writing backup_jobs.conf. Can someone please tell me which file needs to be modified.
I'm not sure if the connection string the Diskstation wants or if the string the Readynas uses is the standard string. Possibly this can be updated in next firmware version.
Best regards
Jens
12 Replies
Replies have been turned off for this discussion
- mdgm-ntgrNETGEAR Employee RetiredThe path is different because of using Rsync over SSH.
Try copying files using scp and you'll see that paths are specified the same way. - azzkikerAspirantBut when modifying the configuration for Rsync over SSH in "backup_jobs.conf" file it is working.
So in my opinion the Readynas does save the path different, not correct, to configuration file when using Rsync over SSH. - mdgm-ntgrNETGEAR Employee RetiredI guess you're probably right. Interesting.
- azzkikerAspirantI re-checked the man page of rsync, see: "http://linux.die.net/man/1/rsync"
This page describes the the connection of a rsync daemon needs a connection string like this: ip-adress::path
Instead a remote-shell connection needs a connection string like this: ip-adress:/path
To get the correct connection string the rsync daemon needs, i modified the frontview javascrip source on my Netgear readynas 104.
Now it saves the connection string like i need it in the "backup_jobs.conf" file.
But my rsync connection over ssh is not working because my synology nas, i think, is asking for a password.
A connection of ssh directly via console using the command "ssh username@ip-adress" from radynas to synology nas is working flawless without any password questions.
So my configuration of RSA-keyfiles should be fine.
When sending the "rsync -avuz -e 'ssh -i keyfile' sourec_ip-adress::path //dest/path" i'm getting asked for a password. If i insert the correct password for "username" it will work.
But in automatic configured backup jobs i'm not asked for a password, the frontview has no popup-gui for this and it's also not practcable for backup-jobs. They should run without any user support.
I can add password to "backup_conf.jobs" file and it will work. But then the password is saved in cleartext, which i don't want.
In my opinion the guys from netgear should add some more configuration possibilities to the frontview gui.
Also the port could be made configurable like the people from this task wish to have:
"http://www.readynas.com/forum/viewtopic.php?f=124&t=74216"
Overall i'm not sure if the companies pay much attention on rsync implementation, because my netgear readynas 104 is not easy to configure
and also the synology doesn't offer a lot of information about rsync. It seems to me, both companies prefer the tell the customer to use their
own backup systems which are not usable with different device manufacturers.
The only solution for me is to learn more about linux and kep on trying. Which is also not bad because i improve my knowledge in using linux for future tasks. - mdgm-ntgrNETGEAR Employee RetiredHere is how Rsync over SSH was configured on the old models: http://kb.netgear.com/app/answers/detail/a_id/12263/~/setting-up-rsync-over-ssh
Depending on how you are using Rsync you might need to manually upload the public SSH key file to the NAS using SSH to get Rsync over SSH to work. - azzkikerAspirantMy readynas 104 is completely different to configure.
But it seems, the rsync configuration on old models is more detailed.
On my readynas 104 i could easily read the public key with web-gui and insert it using
the console to my Synology nas.
But Synology doesn't offer the option to insert public keys using web admin. Or i was not able to find it.
The connection using ssh from readynas to synology nas is working fine without needing any password.
But "rsync+ssh" is not working and i don't find why rsync+ssh is asking for password. - xeltrosApprenticeto automate SSH login, the best option is to enable certificate authentication without password.
Another one would be to use expect in a script, I believe this could work. Both require to log in with SSH for configuration since the RN104 don't allow SSH configuration on the web interface but only ssh enable/disable.
By the way, Netgear keeps the option of denying support if SSH is enabled so if you run into trouble, depending on what problem you have and who you are working with they may require a factory reset. - azzkikerAspirantThe automated login with certifcates is working when i only use "ssh username@ip-adress".
But it doesn't work with rsync. When starting rsync from command promot i get a password question. If i enter correct password for "username" everything works fine. When using gui i only get error and no password question. I believe my rsync command is wrong or my synology nas has some special configuration which will ask for password with rsync. - xeltrosApprenticessh user@host 'rsync -rtvu /source /dest'
this doesn't work and asks for a password ? - azzkikerAspirantyes, when i use your suggested command i get asked for a password.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!