public Session([NotNull] Socket socket, [NotNull] Dictionary <string, string> hostKey, [NotNull] IReadOnlyCollection <AuthenticationMethod> authenticationMethods, [NotNull] IClientKeyRepository clientKeyRepository) { this.socket = socket; this.hostKey = hostKey.ToDictionary(s => s.Key, s => s.Value); this.ServerVersion = "SSH-2.0-FxSsh"; this.clientKeyRepository = clientKeyRepository; this.AuthenticationMethods = new Dictionary <AuthenticationMethod, bool>(); foreach (var authenticationMethod in authenticationMethods) { this.AuthenticationMethods.Add(authenticationMethod, false); } }
public void SetClientKeyRepository([NotNull] IClientKeyRepository clientKeyRep) { this.clientKeyRepository = clientKeyRep; }