Sshd user access is denied? Trying to setup Remote NAS backup from EX2100 to 2TB My Cloud

I have an EX2100 (8TB/ 4TB Raid1) with just over 1TB used. I picked up a WD My Cloud 2TB on clearance this morning and I want to use the Remote NAS backup on the EX2100 to sync the data from the EX to the MC.

The EX2100 is giving RSYNC errors from the GUI and when I tried to run rsync via the command line I discovered that the user sshd (who’s password I manually set on the 2TB) has NO access.

On the 2TB MC I can’t login via SSH or WinSCP with the user “sshd”. I checked the status of the account and it’s not expired or locked.

So I can’t change the remote account name on the EX2100, and the “sshd” user has no access on the 2TB.

I was able to run rsync manually via the CLI from the EX2100 to the MC and sync my public share using “root” as the remote side login… and yes I could create a chron job to sync my various shares but I want the ability to log into the GUI and check status an easily add new shares to the back job!

Anyone run into this?

I’m assuming you bought a GEN 1 my cloud. Those don’t support being a remote backup target. I’m not even sure if the G2 does, but the GUI hints that it does…

If it’s a version 2.x firmware, you have a Gen2. If it’s a version 4.x firmware, it’s a Gen1.

v04.04.03-113

So the next question is can the default user be changed on the EX2100 for remote backup from ‘sshd’ to ‘root’?

So I made the following edits and cleared up the rsync errors…

To the file “/etc/passwd” made an entry for sshd that was an exact copy of the entry for root, just like on the EX2100.

I also edited /etc/ssh/sshd_config by adding a the sshd user to the line “AllowUsers root” to “AllowUsers root sshd”.

My last error message is “Invalid Remote Backup Password. Try again.” when I try to select the destination from the back up GUI.

SSHD reloaded after changes? service ssh reload;

I did a full restart to be safe, no change.

“In Password, enter the remote backup password which was created when Enabling Remote Server”

So when building the job it expects you to have enabled “remote server” and set a password. There isn’t an option for that on the 2TB MyCloud. So what does this turn on for the larger units where it comes out of the box? Some service, some account. I just don’t know what service/account that is.

You mentioned earlier you did an exact copy of the root as sshd user in the /etc/passwd but I believe there’s already an entry for sshd which disallow logins:

cat /etc/passwd|grep sshd
sshd:x:101:65534::/var/run/sshd:/usr/sbin/nologin

Check again above if you have duplicates and ensure you can login using CLI i.e. sshd@wdmycloud.

Edited: How exactly did you add the sshd user? Just by duplicating the root? What about the shadow file?

Once I added the user sshd to the AllowUsers list in /etc/ssh/sshd_conf I tried to ssh and got disconnected because the user sshd had no shell.

When I found that the /etc/passwd file contained the shell settings for each user I then discovered it wasn’t there.

I compared the MyCloud to the EX2100 and found the EX2100 to have the user sshd listed so I added it on the MyCloud side.

SSH works fine for the user sshd.

From the EX2100 I can run rsync with sshd credentials on the MyCloud.
“rsync -avh /shares/Public sshd@wdmycloud/shares/Public” works just fine. The files start the sync right away.

Sorry, I’m not very Linux savvy. Me and Google get pretty far but I couldn’t figure this one out alone. I’ve been tinkering with a few RaspberryPi projects so I figured I’d try to add another level of data back up to my NAS.

No problem we’re here to help one another :slight_smile:

I don’t have the EX2100 so I can’t help much with that device. But since you can already rsync to the single bay MC using sshd account, then everything you did is good on the MC side. Only left to figure out the EX2100 part.

I got this screenshot from WD’s support page: http://support.wdc.com/KnowledgeBase/answer.aspx?ID=11807

Is this you’re expecting to see and configure? Are you able to browse the “Destination Folder” after filling all the details?

Edited: Just some thoughts, you can test a loopback, meaning set the destination IP as your current EX2100 then test some small folders see if it works. OR if you have any other SSHD server to test.

The error occurs when I click the browse button for the destination folder.

I used to see both and SSH and rsync error there. Those are resolved.

I’ll setup another sshd source, and rsync works locally on the EX2100 however you can’t do a remote backup via the GUI, it tells you to enter a remote IP.

Enter the local IP of MyCloud on the GUI when prompted? Your only issue is now with the EX2100 GUI. I think it’s best to ask in the EX2 section of the forum as most here has the MyCloud.

https://community.wd.com/c/network-attached-storage/wd-my-cloud-ex2

Thanks for all your help Nazar78! I’ll follow up here if I get a solution.