Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any example for Windows users? #30

Open
horacehylee opened this issue Apr 28, 2023 · 1 comment
Open

Any example for Windows users? #30

horacehylee opened this issue Apr 28, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@horacehylee
Copy link

horacehylee commented Apr 28, 2023

Thanks for this awesome work!

May I ask if any Windows example available?
As tried with gokr-rsyncd --daemon --gokr.listen=localhost:8730 --gokr.modulemap=pwd=C:\Users\Public and does not work with error of unexpectedly able to write file

@stapelberg
Copy link
Contributor

I had some success with the following rsyncd.toml:

# safe with authorized ssh
dont_namespace = true

[[listener]]
  [listener.authorized_ssh]
    address = ":22873"
    authorized_keys = "authorized_keys.txt"

[[module]]
  name = "repro"
  path = "C:\\Users\\Michael Stapelberg\\rsyncpwd"

…and then starting gokr-rsyncd.exe --daemon --gokr.config rsyncd.toml

From my other machine, I could transfer the files in rsyncpwd using:

% cat >> ~/.ssh/config <<'EOT'
Host beast-windows-rsync
	Hostname beast.lan
	Port 22873
EOT

% rsync -av -e ssh rsync://beast-windows-rsync/repro /tmp/rep
receiving file list ... done
created directory /tmp/rep
./
C:\Users\Michael Stapelberg\rsyncpwd\exfiltrate.png

sent 117 bytes  received 279.055 bytes  558.344,00 bytes/sec
total size is 282.900  speedup is 1,01

% ls -l /tmp/rep
total 276K
-r--r--r-- 1 michael michael 273K 2019-09-20 19:41 'C:\Users\Michael Stapelberg\rsyncpwd\exfiltrate.png'

Note that the filename incorrectly contains the whole path.

I expect that there are a number of smaller issues like that in the code base, as I don’t use Windows.

Improvements welcome.

@stapelberg stapelberg added enhancement New feature or request help wanted Extra attention is needed labels May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants