OpenSSHStore

Posh-SSH · files, openssh-format, known-hosts, key-management, auth

Reads and writes known_hosts and keys in OpenSSH format.

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Management.Automation;
using System.Security.Cryptography;
using System.Text;

namespace SSH.Stores
{
    public class OpenSSHStore : MemoryStore
    {
        private class HashedKeysStruct
        {
            public byte[] Salt { get; set; }
            public string HostHash { get; set; }
            public string KeyName { get; set; }
            public string Fingerprint { get; set; }
        }

        private class WildcardKeysStruct
        {
            public WildcardPattern Pattern { get; set; }
            public string KeyName { get; set; }
            public string Fingerprint { get; set; }
        }

        private readonly string FileName

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key