Table of Contents

Class SshAlgorithmList

Namespace
SshSharp
Assembly
SshSharp.dll

An algorithm list for KexAlgorithms, HostKeyAlgorithms, Ciphers, Macs, PubkeyAcceptedAlgorithms or CASignatureAlgorithms, in the forms ssh_config's Ciphers, KexAlgorithms, MACs, HostKeyAlgorithms, PubkeyAcceptedAlgorithms and CASignatureAlgorithms take: a list that replaces SshSharp's defaults (Only(params string[])), or a change to them that keeps up with new defaults in later versions (Append(params string[]), Prepend(params string[]), Remove(params string[])).

public sealed class SshAlgorithmList
Inheritance
SshAlgorithmList
Inherited Members

Remarks

The names are checked when the list is assigned to an option: one SshSharp does not implement for that kind of algorithm is an ArgumentException, so a typo does not silently fall back to the defaults. FipsMode still applies on top of the list. ToString() gives the ssh_config form, which Parse(string) reads back.

A list means what the same text means in ssh_config, where SshSharp applies it as ssh does, with one restriction: only Remove(params string[]) takes wildcards here, while in ssh_config a pattern in any form stands for the names it matches.

Methods

Append(params string[])

The defaults, with these algorithms added at the end (ssh_config's +, Ciphers +a,b).

Only(params string[])

Exactly these algorithms, in this order of preference (ssh_config's plain list, Ciphers a,b).

Parse(string)

Reads a list in ssh_config's syntax: a,b, +a,b, -a,b* or ^a,b.

Prepend(params string[])

The defaults, with these algorithms moved or added to the front (ssh_config's ^, Ciphers ^a,b).

Remove(params string[])

The defaults, without the algorithms that match these patterns (ssh_config's -, Ciphers -a,b*).

ToString()

The list in ssh_config's syntax, for example -chacha20-poly1305@openssh.com.