Update Phase 6: Fix SFTP subsystem initialization and data handling
Phase 6 updates: - Add SftpHandler integration in Channel structure - Initialize SFTP handler on subsystem request - Handle SFTP packets via CHANNEL_DATA - Fix CHANNEL_DATA response handling in server loop Phase 7 progress: - SFTP subsystem initialization working - SSH_FXP_INIT/VERSION handshake working - SFTP packet format partially implemented - Need further debugging for complete SFTP functionality Current status: - SSH command execution fully working (Phase 6 ✓) - SFTP connection initialization working - File transfer operations pending debug
This commit is contained in:
@@ -330,7 +330,12 @@ fn handle_ssh_service_loop(
|
||||
}
|
||||
Some(&pt) if pt == PacketType::SSH_MSG_CHANNEL_DATA as u8 => {
|
||||
info!("Received SSH_MSG_CHANNEL_DATA");
|
||||
channel_manager.handle_channel_data(&packet)?;
|
||||
if let Some(response) = channel_manager.handle_channel_data(&packet)? {
|
||||
// Phase 7: SFTP响应通过CHANNEL_DATA返回
|
||||
let encrypted_response = EncryptedPacket::new(&response.payload, encryption_ctx, true)?;
|
||||
encrypted_response.write(stream)?;
|
||||
info!("Sent SSH_MSG_CHANNEL_DATA (SFTP response)");
|
||||
}
|
||||
}
|
||||
Some(&pt) if pt == PacketType::SSH_MSG_CHANNEL_CLOSE as u8 => {
|
||||
info!("Received SSH_MSG_CHANNEL_CLOSE");
|
||||
|
||||
Reference in New Issue
Block a user