Warren
4122ceac94
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
Fix SSH PTY request: Correct terminal modes reading
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
2026-06-15 12:20:34 +08:00
..
2026-06-15 12:20:34 +08:00
2026-06-13 20:19:25 +08:00