Public Access
Let a session's transport say what it negotiated
ISshConnection and ISftpSession both carry Cipher now — the server-to-client algorithm off SSH.NET's own ConnectionInfo, captured once because a rekey is not an event that library raises — and TerminalWorkspace.GetSessionFacts hands that plus the host key's algorithm back per session, without ever handing over the connection itself. Nothing reads either yet; the status bar that will is the next commit.
This commit is contained in:
@@ -36,6 +36,12 @@ public sealed class KeyAuthenticationTests(SshServerFixture fixture)
|
||||
|
||||
connection.IsConnected.ShouldBeTrue();
|
||||
|
||||
// The one place this suite checks Cipher against a real handshake rather than a fake's fixed string.
|
||||
// SSH.NET negotiates whatever the container's sshd offers first from its own preference list, so the
|
||||
// exact algorithm is not pinned here — only that ConnectionInfo.CurrentServerEncryption came back as
|
||||
// something rather than the empty string a stalled or pre-handshake read would produce.
|
||||
connection.Cipher.ShouldNotBeNullOrEmpty();
|
||||
|
||||
// Authenticated is not the same as usable: a channel has to open on the connection too.
|
||||
await using var shell = await connection.OpenShellAsync(TerminalSize.Default, Token);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user