mirror of
https://github.com/m1ngsama/TNT.git
synced 2026-02-08 00:54:03 +00:00
Replace deprecated message-based authentication and channel APIs with modern callback-based server implementation (libssh 0.9+). Changes: - Replace ssh_message_auth_password with auth_password_function callback - Replace ssh_message_channel_request_pty_* with channel_pty_request_function - Remove #pragma GCC diagnostic ignored "-Wdeprecated-declarations" - Implement session_context_t to pass state between callbacks - Fix event loop to wait for auth, channel open, AND channel ready (PTY/shell/exec) Key improvements: - Eliminates message loop complexity (libssh handles state machine) - Proper handling of SSH exec requests (e.g., "ssh host exit") - More maintainable and future-proof code Testing: - All tests passing (17/17) - Basic functionality: 3/3 - Anonymous access: 2/2 - Security features: 11/11 - Stress test: pass This closes the maintenance debt listed in TODO.md and ensures compatibility with future libssh versions.
12 lines
544 B
Markdown
12 lines
544 B
Markdown
# TODO
|
|
|
|
## Maintenance
|
|
- [x] Replace deprecated `libssh` functions in `src/ssh_server.c`:
|
|
- ~~`ssh_message_auth_password`~~ → `auth_password_function` callback (✓ completed)
|
|
- ~~`ssh_message_channel_request_pty_width/height`~~ → `channel_pty_request_function` callback (✓ completed)
|
|
- Migrated to callback-based server API as of libssh 0.9+
|
|
|
|
## Future Features
|
|
- [x] Implement robust command handling for non-interactive SSH exec requests.
|
|
- Basic exec support completed (handles `exit` command)
|
|
- All tests passing
|