Xceed .NET Libraries Documentation
Xceed.SSH.Client Assembly / Xceed.SSH.Client Namespace / SSHClient Class


In This Topic
    SSHClient Class
    In This Topic
    Represents the SSH client that will be used for the SFTP operations.
    Object Model
    SSHClient ClassSSHAlgorithmList ClassSSHClientConnectionManager ClassSSHConnectionProtocol ClassSSHAlgorithmList ClassSSHAlgorithmList ClassSSHAlgorithmList ClassSSHAlgorithmList ClassISSHIOProvider InterfaceSSHAlgorithmList ClassSSHAlgorithmList ClassProxyClient ClassSSHAlgorithmList ClassISSHTcpIPIOProvider InterfaceSSHTransportLayerProtocol Class
    Syntax
    'Declaration
     
    
    Public Class SSHClient 
       Implements System.IDisposable 
    'Usage
     
    
    Dim instance As SSHClient
    public class SSHClient : System.IDisposable  
    Remarks

    SSHClient is the

    SSHClient contains properties and methods to connect and disconnect from a remote SSH server. Perform user authentication. Handle events that are global to a SSH connection.

    A SSHClient object is used as a parameter in the creation of SSH services like SFtp.

    The SSH specification allows for a single physical SSH connection to establish multiple logical channels for services like SFtp to the same SSH server. So, a single SSHClient object can be used as a parameter to multiple instances of SSH services (like SFtp for example) to the same server. Each time, a logical "channel" will be managed by SSHClient with the server.

    Inheritance Hierarchy

    System.Object
       Xceed.SSH.Client.SSHClient

    Public Constructors
     NameDescription
    Public ConstructorOverloaded. Initializes a new instance of the SSHClient class.  
    Top
    Protected Fields
     NameDescription
    Protected Field  
    Protected FieldThe SSHClientConnectionManager that the SSHClient uses.  
    Protected Field  
    Protected Field  
    Protected Field  
    Protected FieldThe SocketIOProvider that the SSHClient uses.  
    Protected Field  
    Protected FieldThe SSHProtocolsProvider that the SSHClient uses.  
    Top
    Public Properties
     NameDescription
    Public PropertyTODODOC Gets a string that indicates the currently active encryption algorithm for data that goes from the client to the server.  
    Public PropertyTODODOC Gets a string that indicates the currently active encryption algorithm for data that goes from the server to the client.  
    Public PropertyTODODOC Gets a string that indicates the currently active encryption algorithm for data that goes from the client to the server.  
    Public PropertyTODODOC Gets a string that indicates the currently active encryption algorithm for data that goes from the server to the client.  
    Public PropertyTODODOC Gets a string that indicates the currently active key exchange algorithm.  
    Public PropertyTODODOC Gets a string that indicates the currently active public key algorithm.  
    Public PropertyGet or sets a Boolean value that indicates whether SSHClient can close its assigned TraceWriter as part of its cleanup.  
    Public PropertyGets a System.Boolean value that indicates if the SSHClient object is authenticated to a server or not.  
    Public Property  
    Public PropertyGets a System.Boolean value that indicates if the SSHClient object is connected to a server or not.  
    Public Property  
    Public PropertyGets the SSHClient's SSH connection protocol.  
    Public Property  
    Public Property  
    Public Property  
    Public Property  
    Public PropertyGets the host name used to connect, or an empty string if not connected.  
    Public Property  
    Public Property  
    Public Property  
    Public Property

    Gets or sets the local IP address and port from which the SSH client will be or is connected from.

     
    Public PropertyGets the port being used by the SSH client.  
    Public PropertyGets or sets the proxy client to use for connecting and/or logging in via a proxy server.  
    Public Property  
    Public PropertyGets the host name used to connect expressed as a System.Net.IPEndPoint object or null if the client is not connected.  
    Public Property  
    Public Property  
    Public Property  
    Public Property  
    Public Property  
    Public PropertyGets or sets a value, in seconds, indicating after what period of time an SSH operation should timeout.  
    Public PropertyTODODOC Gets or sets a value, in seconds, indicating after what period of time an SSH operation should timeout.  
    Public PropertyGets or sets the System.IO.TextWriter which will trace the connection/deconnection process as well as the commands and replies sent to and received from the SSH server.  
    Public PropertyGets or sets the format used to generate textual timestamps for logs written to the TraceWriter.  
    Public PropertyGets or sets a format provider object used to generate textual timestamps for logs written to the TraceWriter.  
    Public PropertyGets or sets a boolean value that indicates whether the timestamps for logs written to the TraceWriter use UTC time or local time.  
    Public Property  
    Public Property  
    Public PropertyGets or sets a System.Boolean value that indicates whether, when connecting, the client should wait for the server to send its encryption keys.  
    Top
    Public Methods
     NameDescription
    Public MethodOverloaded. Performs authentication of the SSHClient's SSH connection using the provided username and password.  
    Public Method  
    Public MethodOverloaded. Connects the SSHClient to an SSH server.  
    Public MethodDisconnects the SSHClient from the SSH server.  
    Public MethodOverloaded. TODODOC Performs cleanup of unmanaged resources.  
    Public Method  
    Public MethodOverloaded.   
    Public Method  
    Public MethodOverloaded.   
    Top
    Protected Methods
     NameDescription
    Protected MethodAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.  
    Protected Method  
    Protected Method  
    Protected Method  
    Protected Method  
    Top
    Public Events
     NameDescription
    Public EventTODODOC  
    Public EventTODODOC  
    Public EventTODODOC  
    Public EventThis event is triggered during connection sequence to a SSH server when the server's public key is received for authentication.  
    Top
    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Standard: netstandard2.0, netstandard2.1

    .NET Framework: net20, net35, net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also