<PackageReference Include="SSH.NET" Version="2025.1.0" />

SftpException

public class SftpException : SshException
The exception that is thrown when an error occurs in the SFTP layer.
public StatusCode StatusCode { get; }

Gets the status code that is associated with this exception.

public SftpException(StatusCode statusCode)

Initializes a new instance of the SftpException class.

public SftpException(StatusCode statusCode, string message)

Initializes a new instance of the SftpException class.

public SftpException(StatusCode statusCode, string message, Exception innerException)

Initializes a new instance of the SftpException class.