Table of Contents

Property ConnectionAttempts

Namespace
SshSharp
Assembly
SshSharp.dll

ConnectionAttempts

How many times to try the network connection, one second apart, as ssh_config's ConnectionAttempts: the TCP connection to the server, or to the first of the JumpHosts, or to the Proxy. Only failures to reach it are tried again (refused, unreachable, timed out), never a name that does not resolve, a proxy's refusal, a failed handshake or authentication, and ConnectTimeout bounds all the attempts together. Default 1. Used by ConnectAsync(string, int, SshClientOptions, CancellationToken); ignored when connecting over a stream you opened.

public int ConnectionAttempts { get; init; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

The value is less than 1.