WD Community

How to change the SSH Ports in WD MY Cloud and PR4100 for device to device conectivity

HI,
i want to configure a remote backup Job from MY Cloud Single Bay to My Cloud PR4100.
there is some restriction on ISP Side the TCP port is blocked from ISP side

how can i change the ssh connectivity on different port as port 22 is blocked from ISP level.

Regards,

There are probably other issues related to the router in your network as well.

You probably need to look into Port Forwarding options on your NAS. Essentially, this will “map” the port 22 on your local device to a different port on your router for communication to the outside world.

This would be the same procedure if you had a second device (say, another NAS) on your network that ALSO wanted port 22.

I checked with the ISP they told me that it is blocked at router level.

i did port forwarding on router to access WDPR through SSH over internet and its working fine, but my concern was that how can i tell the other WD My Cloud Device that remote WDPR SSH Port is changed.

whenever i try to configure remote backup on WD my Cloud its gives me error of RSYNC test.

You need to edit sshd_config which is in /etc/ssh once you change the port you will need to restart the service
sudo service ssh reload


Feb 26 01:49:26 bob-linux systemd[1]: Reloading OpenBSD Secure Shell server.
Feb 26 01:49:26 bob-linux sshd[4693]: Received SIGHUP; restarting.
Feb 26 01:49:26 bob-linux systemd[1]: Reloaded OpenBSD Secure Shell server.
Feb 26 01:49:26 bob-linux sshd[4693]: Server listening on 0.0.0.0 port 224.
Feb 26 01:49:26 bob-linux sshd[4693]: Server listening on :: port 224.
Feb 26 01:49:26 bob-linux sshd[4693]: Server listening on 0.0.0.0 port 12345.
Feb 26 01:49:26 bob-linux sshd[4693]: Server listening on :: port 12345.
Feb 26 01:49:26 bob-linux sshd[4693]: Server listening on 0.0.0.0 port 222.
Feb 26 01:49:26 bob-linux sshd[4693]: Server listening on :: port 222.

This may be useful.

@brannonb you can’t sudo service in My Cloud software.
Edit the /etc/ssh/sshd_config and use kill -HUP $(pidof sshd) to reload.

Wonder whats at line 1530 of main.c? I only have a DX4000 and MyCloudgen 1/ no pr4100

My bad… linked the wrong post, but it’s all there in that topic.
Rsync bails with that error when it can’t connect over ssh.

nohup it. problem solved

This is not a permanent solution. If you update the sshd user’s password via the web UI then it will overwrite /etc/ssh/sshd_config and, in doing so, revert to less secure settings such as allowing passwords (over pubkey), allowing empty passwords, and resetting the default port to 22.

passwd sshd and it saves to sshd_config? /face palm

I just ran into a similar problem. When you reboot the sshd_config file also reverts, and authorized_keys disappears. These are getting generated by a script somewhere. I think the whole environment is. Changes don’t persist.

Support for Western Digital Hard Drives | Western Digital

Still Need Help?

Reach out to Support for more assistance.

Sign in to Your Support Account

Get up-to-date information about your products.

Western Digital Business Portal

Unlock benefits and tools for your business such as enterprise support, pricing and rebate tools, marketing, loyalty, rewards, and more.