Need Assistance Configuring EX4100 (CRON + SSH)

Hello Community,

I need assistance with configuring my EX4100 through SSH. I have a persistent cron added to usr/local/config/config.xml utilizing the internal backup method for an additional job tag.

The issue I am having is that my reboot cron defined is not actually rebooting. the path for the command I provided was usr/sbin/reboot. When running this command manually all is well, but the cron fails to run. Since WD has configured the crontab’s logging to not be on, I cannot see details. I have however confirmed that it is not happening.

So you’ll ask, okay what are you trying to accomplish? The reboot is just a standard practice and is meant to just give the hardware a fresh start for the following day.

Okay you’ll say “that’s fine, but what else are you trying to accomplish that needs a working cron?”… well I have a build server running (docker env.) and at the end of the build I would like the docker image to communicate to the NAS through SSH and place the output within a specific folder. Why not use FTP? just want something more secure to be fair.

Here are issues I see with setting this up though… I’ve managed to give a custom account SSH access through ssh config… don’t remember how I made it persistent, but I managed somehow in the past when I knew more about how this guy was configured. The issue is that there isn’t any bash/console that doesn’t have root access, so if anyone compromised the NAS they would have full access to the the drive :frowning:

So does anyone have any clever suggestions or instructions for me to attempt to implement? The build env. provides me with a SSH public key, so I would need to keep that persistent on the NAS as well.

@dswv42 going to pull you into this thread as it seems that you’ve had the most time reverse engineering the in and outs of the EX4100 or NAS ecosystem. Please let me know your thoughts and recommendations. There was another individual here that had done a lot of work, but it seems as her posts were removed?

No one?

In my Entware package (get it here) I added a persistent /home/root directory in the init/clean scripts.
E.g. on your PC you can do this to setup SSH keys

ssh-copy-id root@your.WD.MyCloud.IPaddress

Anything in /opt/etc/init.d is started on boot and stopped on shutdown.
I don’t see what you’d need cron for at the moment.

I din’t know if it is supported, but you might try with sftp.