4122ceac94
Problem: - Interactive SSH connections (ssh markbase) failed with 'Connection reset by peer' - Server error: 'failed to fill whole buffer' when processing pty-req request Root cause: - Terminal modes reading incorrectly used read_ssh_string() - This caused double reading of length field (modes_len already read) - Correct approach: read modes_len bytes directly after reading modes_len Fix: - Changed from: read_ssh_string(cursor) for modes - Changed to: read_exact(&mut modes) after reading modes_len - Fixed typo in pixel_width/pixel_height variable declarations RFC 4253 Section 6.2 PTY request format: string terminal modes (uint32 length + data) We now correctly read the data after the length field Test results: sshpass -p 'demo123' ssh markbase 'whoami && pwd': Success ✓ Interactive SSH session now works correctly ✓ Files modified: - channel.rs: Fixed handle_pty_request() modes reading