Please put feedbacka and discussion here… Maybe even suggestions and improvements to the tutorial.
Hope to hear from you,
Date: 22 Jul 2008 19:58
Number of posts: 26
RSS: New posts
Some of these sections would also be good as stand-alone pages. For example "Adding SSH keys to automate login" would be useful even for those people not using rsync in the same manner. You could use [[include pagename]] to easily carry text across between pages.
Overall a very indepth and valuable resource.
Is have something we might consider.
I notice when i Bring MyBook home, that the time on it got desynchronized with real time about the same time it took me to commut.
This is maybe Because the little Book does not have battery, so it bring me to conclusion that if we have a blackout, the scheduler time will be changing in time becasue of it. and maybe with the reboot once a week will in the long run do the same in the time.
I was wondering if it is posible to sincronize the time with a time server.
I have been using this method but modified slightly…
It also seems that 'server' in /etc/ntp.conf keeps getting overwritten with null if the MyBook is in static IP mode instead of DHCP mode……I'm still looking into this…..
You can set up a cron job to set the time using a script which calls ntpdate. There are threads about this in the forum. If you do this, you can disable the ntp service altogether. However, I haven't done that yet. I'm still trying to work out what the MyBook firmware is doing whilst in static ip mode…..My guess is that WD 'preferred' DHCP when they were designing their firmware to support full mobility. If you set to DHCP, then /etc/ntp.conf 'server' is auto set to pool.ntp.org iburst. I don't yet know how it gets there, or what puts it there……
Thanks for the info.
I put this in /etc/crontabs/root
- synchronize in the Mexican time server at 3:05
3 5 * * * ntpdate -u cronos.cenam.mx
So every day at 3:05 will check the time in this case the mexican server using the parameter
-u wich mean —— Direct ntpdate to use an unprivileged port for outgoing packets.
Just to say that I follow this post and it work great. I discover it when I was in the middle of setting my own solution, but this one is soo clear and simple that I immedialy adopt it.
One question, you set the key length to 4096 for ssh authentication, but the key length for the server is only the default value. Should I regenerate the server key with 4096 bits?
Also, I understand that ssh use compression. Is it true? And in your case, as the power of the processor is limited, shouldn't we remove either the ssh compression or the rsync one?
Thanks again for this very usefull page.
The keysize is set to 4096 for security purposes. Keys of 1024 length are under discussion already, being on the save side with 4096.
The keylength should be 4096 for the keypair… so this should be on both the public and private key. Only the private key is on the server, on any slave/client the public keys is used.
The SSH compression is true when used over a internet connection, assuming you have a "good" mix of regular files and already compressed files you should see compression effects. If you remove compression of rsync I have seen slowdowns. Some testing has shown that in cases where you sync over the internet (which this was written for) compression helps in all situations. Even though the processorpower is low, the internet pipe is slower (for now this is true).
If you have large files (in my case > 5G), it is usefull to add —partial to the rsync command line.
If you don't, the transfert will alway restart for the same file.
SHouldn't we also modifie the sshd.conf file?
something like removing the version 1 of the protocol, disable password authentication, and so on…
hey! i cant seem to get ssh key automated login both ways (only 1/2 ways) from my Etrayz Xstreamer Nas to WD Nas. It does automate login from WD to etrayz xtreamer Nas though. I do the same steps and when i do ssh-keygen under etrayz Nas it also prints out a key's randomart image and maybe this is the problem because WD doesnt have that extra on it. i then scp the id_rsa.pub over to WD Nas and call it authorized_keys but no matter what…..it still asks me for a password when ssh root@mybook1. do you have any suggestions or can i prevent in any way the extra part about the "key's random art image" on the Etrayz? i use the same ssh-keygen -b 4096 -N '' -t rsa -f id_rsa command btw.
Your SSH Keys issue is a permissions issue in this article. You can fix it by running the following on your mybook:
chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
I highly suggest this is added to the instructions.
I have been working on some customizations of this but would the author prefer I added them to this?
I am also working on breaking them out, and likely will do so and just credit this as a beginning source. That is unless the author would like to collaborate on this effort.
I had not checked the forum for ages. You improvements may be added. It's a wiki after all, I am all for improving on my work.
Thanks for adding,
i just tried the updates suggested and its FIXED! sweet. thanks to number3, spectre03, etc.
I have another issue with this. the mybookworld has a ddns address a.b.com. from the etrayz nas, I did a ssh moc.b.a|toor#moc.b.a|toor to wd nas and it denied me altogether saying "The RSA host key for a.b.com has changed,
and the key for the corresponding IP address ##.###.##.## is unknown. This could either mean that DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time." I was able to make it autologin from the same network with say ssh 01.0.861.291|toor#01.0.861.291|toor and it pasted another key in known_hosts with the current IP. It has definitely changed several times on the WD nas since I set the keys up. is there a way to automate the first case no matter what?
First of all thanks for the great tutorial, had to update a number of items, but got it working quite quickly.
An issue though with the scheduled reboot; whenever the reboot commands executes (7am in my case) the system returns with a system time earlier (6:30am, based on the hardware clock), now once the NTP service corrects it to the right time, CRON executes the reboot command again. This goes on-and-on until the hardware time is beyond 7am. The time difference is also not stable, it seems to increase. For now I disabled it, but really need it as with large rsync updates one of the devices tends to lock-up.
Is there a way I can force the NTP update before starting CRON? (please be explicit, as going through the tutorial was my first linux experience …), Thankx in advance for any help.
PS. I had to update the SSHD config because I could still login after only modifying SSH config. So this omission is a security issue with the tutorial!
Resolved it; modified the crond start script, just before line
/usr/sbin/crond -c /etc/crontabs
I added an NTP update command
ntpdate –b pool.ntp.org
That forces a time update before crond is started
inadyn isnt updating my ip automatically. i tried this a couple months ago and am going to try again as i dont want to keep manually updating host ip. i followed the instructions and on the ::once command removed the "< & >" in <user account> and just put -u dz2k any suggestions?
i was able to get it working with the help of original post & dyndns inadyn support page which also has examples & an automated update client configurator! thanks. the command is as follows:
::once:/opt/bin/inadyn -u <user account> -p <very long grc pass> —syslog —update_period_sec 3600 —forced_update_period 864000 —dyndns_system gro.sndnyd|sndnyd#gro.sndnyd|sndnyd -a <your.domain.tld>
Note: the 3 items above with brackets < > around them will need to be changed and < > should be removed.
I admit I don't understand how rsync works exactly, but I was surprised to realize the configuration pulls the files from the remote server rather than push to the remote server. Does that mean a full deep directory scan on the remote box is performed across the wire every time it runs? Also, how frequently does cron actually kick off the process? If scheduled for 10pm to 7am and the rsync completes in say 5 min, will it be executed again during the same window?
rsync can pull or push files. its all in how your configuration file is setup. from my understanding, rsync uses a great algorithm and the 1st time ran will be full deep directory scan and could possibly take a long time but after that it runs that same deep directory scan but only updates what's been updated since it ran the last time. I set cron to run once per hour (on the hour) so it runs several times from 10pm to 7am in the case it completes in say 5 min. there are crontab command line generators if you do a google search.