<PackageReference Include="SSH.NET" Version="2025.0.0" />

InformationRequestMessage

Represents SSH_MSG_USERAUTH_INFO_REQUEST message.
using Renci.SshNet.Common; using System; using System.Collections.Generic; using System.Text; namespace Renci.SshNet.Messages.Authentication { internal sealed class InformationRequestMessage : Message { public override string MessageName => "SSH_MSG_USERAUTH_INFO_REQUEST"; public override byte MessageNumber => 60; public string Name { get; set; } public string Instruction { get; set; } public string Language { get; set; } public IReadOnlyList<AuthenticationPrompt> Prompts { get; set; } protected override void LoadData() { Name = ReadString(Encoding.UTF8); Instruction = ReadString(Encoding.UTF8); Language = ReadString(SshData.Ascii); uint num = ReadUInt32(); List<AuthenticationPrompt> list = new List<AuthenticationPrompt>(); for (int i = 0; i < num; i++) { string request = ReadString(Encoding.UTF8); bool isEchoed = ReadBoolean(); list.Add(new AuthenticationPrompt(i, isEchoed, request)); } Prompts = list; } protected override void SaveData() { throw new NotImplementedException(); } internal override void Process(Session session) { session.OnUserAuthenticationInformationRequestReceived(this); } } }