chipsenkbeil / chipsenkbeil/distant
When ssh MaxSessions is 1, hangs after authentication
- Dominant language
- Rust
- Stars
- 635
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
I think this is because we have a pool that evicts sftp, which was used to get info like family (unix/windows), cwd, etc.
From the manager logs:
```
// bunch of russh logs
// challenge sent to client
[2026-03-25 14:28:53.005310 +00:00] DEBUG [distant-core/src/net/manager/server.rs:232] manager::on_request(RequestCtx { connection_id: 3448721192, request: Request { header: Header({}), id: "16104993984344361069", payload: Authenticate { id: 171949496, msg: Challenge(ChallengeResponse { answers: [***] }) } }, reply: "..." })
[2026-03-25 14:28:53.005338 +00:00] TRACE [distant-core/src/net/manager/server.rs:288] Retrieving authentication callback registry
[2026-03-25 14:28:53.005354 +00:00] TRACE [distant-core/src/net/manager/server.rs:291] Sending Challenge(ChallengeResponse { answers: [***] }) through authentication callback
// bunch of russh logs
[2026-03-25 14:28:55.393913 +00:00] DEBUG [distant-ssh/src/utils.rs:248] SFTP canonicalize(".") returned: /home/chipsenkbeil
[2026-03-25 14:28:55.393933 +00:00] DEBUG [distant-ssh/src/utils.rs:255] Windows detected via SFTP: false
[2026-03-25 14:28:55.393945 +00:00] DEBUG [distant-ssh/src/lib.rs:1083] Detected remote family: Unix
// bunch of russh logs
[2026-03-25 14:28:55.551597 +00:00] INFO [distant-ssh/src/pool.rs:143] Server channel limit discovered: 1
[2026-03-25 14:28:55.551621 +00:00] DEBUG [distant-ssh/src/pool.rs:170] Evicted SFTP session to free channel slot
[2026-03-25 14:28:55.551634 +00:00] DEBUG [distant-ssh/src/pool.rs:154] Channel open failed, evicted SFTP session. Retrying after brief delay
// bunch of russh logs
// never see distant do anything other than empty heartbeats
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the hang with SSH MaxSessions set to 1, then start by reading distant-ssh/src/pool.rs around channel-limit discovery and SFTP eviction. Trace the related remote-family detection in distant-ssh/src/utils.rs and distant-ssh/src/lib.rs, using the supplied manager and SSH logs to follow authentication and channel activity. Done means authentication completes without hanging and the remote operation continues under the one-channel limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100