3

I have a Windows server which I would like to PULL data from using Rsync to my Linux server.

Installed openSSH and WSL with Ubuntu on the Windows 10 machine (build 1709) and currently - I am able to SSH from Linux to Windows server, however I cannot use the Rsync due to some error on the Windows side:
'rsync' is not recognized as an internal or external command

I suspect this is due to the fact Im not interacting with WSL, but regular Windows on the other side which does not know rsync. I would like to stay away from Cygwin if possible.

Rsync from Windows to Linux machine works fine.
Appreciate any help as Im more of a Linux guy and have limited experience running Windows servers.

1 Answer 1

2

After you have SSH to the Windows Server, have you tried apt install rsync?

Side question: Have you installed the Windows "native" OpenSSH, or have you installed the package openssh-server inside the WSL?

Tutorial for installing SSH in WSL: https://www.illuminiastudios.com/dev-diaries/ssh-on-windows-subsystem-for-linux/

If I'm not wrong, with the first option you are not connecting to WSL and will not be able to use apt or rsync. Try disabling the SSHd service in Windows and installing openssh-server inside the WSL. As always, create a restore point first.

Hope this helps.

5
  • Thats actually really good question! I first enabled the "native" OpenSSH in Windows and confirmed valid networking with WinSCP. Then it strucked me and I disabled the settings in Windows and installed openssh-server in WSL. Now Im not able to log from remote at all :) SSHD says my user is invalid as its not in the "AllowUser" setting in the config file (while it is and I checked 100 times already). Will keep digging!
    – k_mishap
    Feb 4, 2021 at 22:35
  • Forgot about your first question, apologies - yes, installed via apt isntall rsync, the command works for sending files from local to remote.
    – k_mishap
    Feb 4, 2021 at 22:40
  • Have you tried the steps in the tutorial? For some reason it says you have to reinstall it and edit /etc/ssh/sshd_config to include your user. Also open port 22 on windows firewall. Feb 5, 2021 at 12:49
  • Yes I did. I get it to work by uninstalling Ubuntu 16.04, disabling the OpenSSH in windows and installing Ubuntu 20.04. Then just setup the sshd_config and Im able to run rsync from both machines. Thanks for your suggestions.
    – k_mishap
    Feb 16, 2021 at 14:28
  • 1
    Dead link, why not use the optional feature instead? Jul 19, 2023 at 8:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .