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

SshNetLoggingConfiguration

public static class SshNetLoggingConfiguration
Allows configuring the logging for internal logs of SSH.NET.
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Renci.SshNet.Common; using System.Runtime.CompilerServices; namespace Renci.SshNet { [NullableContext(1)] [Nullable(0)] public static class SshNetLoggingConfiguration { internal static ILoggerFactory LoggerFactory { get; set; } = NullLoggerFactory.Instance; public static void InitializeLogging(ILoggerFactory loggerFactory) { ThrowHelper.ThrowIfNull(loggerFactory, "loggerFactory"); LoggerFactory = loggerFactory; } } }