Table of Contents

Method Parse

Namespace
SshSharp.Config
Assembly
SshSharp.dll

Parse(string, string?)

Parses ssh_config text. Throws FormatException (with the line number) on syntax errors.

public static SshConfig Parse(string text, string? baseDirectory = null)

Parameters

text string

The file contents.

baseDirectory string

The directory relative Include paths resolve against. OpenSSH uses ~/.ssh for user files and the system directory for the system file; the default (null) is .ssh in the home directory given when resolving.

Returns

SshConfig