<PackageReference Include="SSH.NET" Version="2016.0.0-beta2" />

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 { [Message("SSH_MSG_USERAUTH_INFO_REQUEST", 60)] internal class InformationRequestMessage : Message { public string Name { get; set; } public string Instruction { get; set; } public string Language { get; set; } public IEnumerable<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(); } } }