尝试使用 FileZilla 连接到 Windows Server 2016 上的 SFTP 时,我收到“从子进程获取 eof”。调试跟踪如下。有谁知道为什么?还有补救办法吗?
备注:
Status: Disconnected from server
Trace: CControlSocket::DoClose(66)
Trace: CControlSocket::ResetOperation(66)
Trace: CFileZillaEnginePrivate::ResetOperation(66)
Trace: CControlSocket::DoClose(66)
Trace: CControlSocket::ResetOperation(66)
Trace: CFileZillaEnginePrivate::ResetOperation(66)
Trace: CControlSocket::DoClose(66)
Trace: CControlSocket::ResetOperation(66)
Trace: CFileZillaEnginePrivate::ResetOperation(66)
Trace: CFileZillaEnginePrivate::ResetOperation(0)
Trace: CControlSocket::SendNextCommand()
Trace: CSftpConnectOpData::Send() in state 0
Status: Connecting to xxx.xxx.xxx.xxx...
Trace: Going to execute C:\Program Files\FileZilla FTP Client\fzsftp.exe
Response: fzSftp started, protocol_version=11
Trace: CSftpConnectOpData::ParseResponse() in state 0
Trace: CControlSocket::SendNextCommand()
Trace: CSftpConnectOpData::Send() in state 3
Command: open "[email protected]" 22
Trace: Looking up host "xxx.xxx.xxx.xxx" for SSH connection
Trace: Connecting to xxx.xxx.xxx.xxx port 22
Trace: We claim version: SSH-2.0-FileZilla_3.60.2
Trace: Connected to xxx.xxx.xxx.xxx
Trace: Remote version: SSH-2.0-OpenSSH_for_Windows_8.9
Trace: Using SSH protocol version 2
Trace: Doing ECDH key exchange with curve Curve25519 and hash SHA-256 (SHA-NI accelerated)
Trace: Server also has ecdsa-sha2-nistp256/rsa-sha2-512/rsa-sha2-256 host keys, but we don't know any of them
Trace: Host key fingerprint is:
Trace: ssh-ed25519 255 SHA256:+N7KuNqe4nd0Qq6EvuEDFsWX+EeLIkDN0SebsjsPITQ
Trace: Initialised AES-256 GCM outbound encryption
Trace: Initialised AES256 GCM outbound MAC algorithm (in ETM mode) (required by cipher)
Trace: Initialised AES-256 GCM inbound encryption
Trace: Initialised AES256 GCM inbound MAC algorithm (in ETM mode) (required by cipher)
Status: Using username "myusername".
Trace: Attempting keyboard-interactive authentication
Trace: Server refused keyboard-interactive authentication
Command: Pass: *************
Trace: Sent password
Trace: Access granted
Trace: Opening main session channel
Trace: Opened main channel
Trace: Started a shell/command
Status: Connected to xxx.xxx.xxx.xxx
Trace: Got eof from child process
Trace: CControlSocket::DoClose(64)
Trace: CControlSocket::ResetOperation(66)
Trace: CSftpConnectOpData::Reset(66) in state 3
Error: Could not connect to server
Trace: CFileZillaEnginePrivate::ResetOperation(66)
Status: Waiting to retry...
Trace: CControlSocket::DoClose(66)
Trace: CControlSocket::ResetOperation(66)
Trace: CFileZillaEnginePrivate::ResetOperation(66)
Trace: CControlSocket::DoClose(66)
Trace: CControlSocket::ResetOperation(66)
Trace: CFileZillaEnginePrivate::ResetOperation(66)
Trace: CControlSocket::SendNextCommand()
Trace: CSftpConnectOpData::Send() in state 0
Status: Connecting to xxx.xxx.xxx.xxx...
Trace: Going to execute C:\Program Files\FileZilla FTP Client\fzsftp.exe
Response: fzSftp started, protocol_version=11
Trace: CSftpConnectOpData::ParseResponse() in state 0
Trace: CControlSocket::SendNextCommand()
Trace: CSftpConnectOpData::Send() in state 3
Command: open "[email protected]" 22
Trace: Looking up host "xxx.xxx.xxx.xxx" for SSH connection
Trace: Connecting to xxx.xxx.xxx.xxx port 22
Trace: We claim version: SSH-2.0-FileZilla_3.60.2
Trace: Connected to xxx.xxx.xxx.xxx
Trace: Remote version: SSH-2.0-OpenSSH_for_Windows_8.9
Trace: Using SSH protocol version 2
Trace: Doing ECDH key exchange with curve Curve25519 and hash SHA-256 (SHA-NI accelerated)
Trace: Server also has ecdsa-sha2-nistp256/rsa-sha2-512/rsa-sha2-256 host keys, but we don't know any of them
Trace: Host key fingerprint is:
Trace: ssh-ed25519 255 SHA256:+N7KuNqe4nd0Qq6EvuEDFsWX+EeLIkDN0SebsjsPITQ
Trace: Initialised AES-256 GCM outbound encryption
Trace: Initialised AES256 GCM outbound MAC algorithm (in ETM mode) (required by cipher)
Trace: Initialised AES-256 GCM inbound encryption
Trace: Initialised AES256 GCM inbound MAC algorithm (in ETM mode) (required by cipher)
Status: Using username "myusername".
Trace: Attempting keyboard-interactive authentication
Trace: Server refused keyboard-interactive authentication
Command: Pass: *************
Trace: Sent password
Trace: Access granted
Trace: Opening main session channel
Trace: Opened main channel
Trace: Started a shell/command
Status: Connected to xxx.xxx.xxx.xxx
Trace: Got eof from child process
Trace: CControlSocket::DoClose(64)
Trace: CControlSocket::ResetOperation(66)
Trace: CSftpConnectOpData::Reset(66) in state 3
Error: Could not connect to server
Trace: CFileZillaEnginePrivate::ResetOperation(66)
错误消息
Status: Connecting to server.net...
Response: fzSftp started, protocol_version=11
...
Status: Connected to server.net
Error: Fatal: unable to initialise SFTP on server: could not connect
Error: Could not connect to server
在菜单中打开调试模式FileZilla > Edit > Settings > Debug > Debug information in message log: 3-verbose
Status: Connecting to server.net...
Response: fzSftp started, protocol_version=11
...
Status: Connected to server.net
Error: Fatal: unable to initialise SFTP on server: could not connect
Error: Could not connect to serverError: Fatal: unable to initialise SFTP on server: could not connect
Trace: Got eof from child process
Trace: CControlSocket::ResetOperation(66)
Trace: CSftpConnectOpData::Reset(66) in state 3
Error: Could not connect to server
根本原因
从服务器发送的
欢迎消息对于SFTP
协议而言太长!
就我而言,我最近创建了该消息,因此解决方案非常简单:使用 ssh
登录到远程服务器,并清除我的
~/.bashrc
文件生成的不必要的输出,我最近在其中设置了自定义欢迎消息,以在打开新 shell 后显示。 荣誉
感谢您访问 WinSCP 收到的太大 (... B) SFTP 数据包的帮助页面。支持的最大数据包大小为 102400 B
!
修复:
导航至:C:\ProgramData\