-
Notifications
You must be signed in to change notification settings - Fork 764
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
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver] #1869
Comments
A possibly related question: how can one control in OpenSSH for Windows whether
That distinction between binary-transparent low-level I/O and cursor-control-oriented console I/O in Windows does not exist under Unix, and therefore I assume there must be some selection mechanism to tell OpenSSH for Windows, which of these to use. I have a suspicion that distinction may be involved in why people have problems using OpenSSH for Windows as a transport tunnel with Unix applications such as rsync, git and subversion, which all pass compressed binary files via stdio to the other side, i.e. are definitely not using SSH as any kind of console application (with UTF-8, ANSI codes and line feeds). Because the ConPTY route will translate/rewrite all ANSI control sequences and is therefore hardly suited as a binary-transparent channel for compressed file transfer, which will only work via Unix-style pipes to redirected stdin/stdout via low-level This is something that I never found well explained in the OpenSSH for Windows documentation, and as this distinction doesn't exist in Unix, the upstream OpenSSH documentation won't be able to help here either. |
Met the exact same problem. Using cmd also doesn't help. |
Does this |
It is still there with v9.2.2.0p1-Beta
|
Use msys2's ssh.exe to transfer normally. Win32-OpenSSH here keeps reporting errors. rsync.exe -e E:/sdk/msys64/usr/bin/ssh.exe |
Troubleshooting steps
https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps
Configure OpenSSH Server
Install cwRsync
Create
user1
user locally with password123
Try to copy file using
scp
Try to copy file using
rsync
This will fail.
I tried to troubleshoot this problem.
It shows:
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 debug1: Connecting to localhost [::1] port 22. debug1: Connection established. debug1: identity file C:\\Users\\WDAGUtilityAccount/.ssh/id_rsa type -1 debug1: identity file C:\\Users\\WDAGUtilityAccount/.ssh/id_rsa-cert type -1 debug1: identity file C:\\Users\\WDAGUtilityAccount/.ssh/id_dsa type -1 debug1: identity file C:\\Users\\WDAGUtilityAccount/.ssh/id_dsa-cert type -1 debug1: identity file C:\\Users\\WDAGUtilityAccount/.ssh/id_ecdsa type -1 debug1: identity file C:\\Users\\WDAGUtilityAccount/.ssh/id_ecdsa-cert type -1 debug1: identity file C:\\Users\\WDAGUtilityAccount/.ssh/id_ed25519 type -1 debug1: identity file C:\\Users\\WDAGUtilityAccount/.ssh/id_ed25519-cert type -1 debug1: identity file C:\\Users\\WDAGUtilityAccount/.ssh/id_xmss type -1 debug1: identity file C:\\Users\\WDAGUtilityAccount/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1 debug1: Remote protocol version 2.0, remote software version OpenSSH_for_Windows_8.6 debug1: match: OpenSSH_for_Windows_8.6 pat OpenSSH* compat 0x04000000 debug1: Authenticating to localhost:22 as 'user1' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:ceWbZ99XvvQUHF8bsSdEvvQaHpMaE54eGir9SQ+3cwc debug1: Host 'localhost' is known and matches the ECDSA host key. debug1: Found key in C:\\Users\\WDAGUtilityAccount/.ssh/known_hosts:3 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 134217728 blocks debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory debug1: Will attempt key: C:\\Users\\WDAGUtilityAccount/.ssh/id_rsa debug1: Will attempt key: C:\\Users\\WDAGUtilityAccount/.ssh/id_dsa debug1: Will attempt key: C:\\Users\\WDAGUtilityAccount/.ssh/id_ecdsa debug1: Will attempt key: C:\\Users\\WDAGUtilityAccount/.ssh/id_ed25519 debug1: Will attempt key: C:\\Users\\WDAGUtilityAccount/.ssh/id_xmss debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: publickey debug1: Trying private key: C:\\Users\\WDAGUtilityAccount/.ssh/id_rsa debug1: Trying private key: C:\\Users\\WDAGUtilityAccount/.ssh/id_dsa debug1: Trying private key: C:\\Users\\WDAGUtilityAccount/.ssh/id_ecdsa debug1: Trying private key: C:\\Users\\WDAGUtilityAccount/.ssh/id_ed25519 debug1: Trying private key: C:\\Users\\WDAGUtilityAccount/.ssh/id_xmss debug1: Next authentication method: keyboard-interactive debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: password debug1: read_passphrase: can't open /dev/tty: No such file or directory user1@localhost's password: debug1: Authentication succeeded (password). Authenticated to localhost ([::1]:22). debug1: channel 0: new [client-session] debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug1: pledge: network debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0 debug1: Sending command: rsync --server -vlogDtprze.iLsfxCIvu . . rsync: connection unexpectedly closed (0 bytes received so far) [Receiver] rsync error: error in rsync protocol data stream (code 12) at io.c(228) [Receiver=3.2.3] rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(228) [sender=3.2.3]
I can't really understand what's the problem.
Change to use cwRsync's
ssh.exe
This will okay!
Try to show ssh logs:
The result:
Terminal issue? please go through wiki
https://github.com/PowerShell/Win32-OpenSSH/wiki/TTY-PTY-support-in-Windows-OpenSSH
Please answer the following
"OpenSSH for Windows" version
((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion)
Server OperatingSystem
((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion\" -Name ProductName).ProductName)
Client OperatingSystem
Same machine
What is failing
Show in Troubleshooting steps Step 5.
Expected output
Show in Troubleshooting steps Step 6.
I expected the Win32-OpenSSH's
ssh.exe
should able to use with any program.Actual output
Show in Troubleshooting steps Step 5.
The text was updated successfully, but these errors were encountered: