PowerTCP SSH and SFTP for .NET
See Also Send comments on this topic

Glossary Item Box

Welcome!

Welcome and thank you for choosing PowerTCP SSH and SFTP for .NET. You have selected what we feel is the most sophisticated and complete .NET SSH and SFTP package available on the market. We know you have a choice in software vendors and we will do our best to exceed your expectations.

Overview

PowerTCP SSH and SFTP for .NET 4.x fills the SSH gap in the .NET Framework by providing stream-based SSH and SFTP communication that can be plugged into any Framework 2.0, 3.0. 3.5, 4.0 or 4.5 application. This latest version leverages the power of the latest .NET environments to provide the most advanced Internet Communications components available. Some of the features include:

  • SFTP and stand-alone SSH session components
  • Username/password and PEM public key authentication
  • Upload, download and delete files
  • Multi-file transfer wildcard support
  • Parse listings automatically
  • Create and delete directories
  • Start multiple sessions over a single connection
  • Progress event for monitoring transfer rate and advancement
  • Synchronous and asynchronous operation modes
  • HTTP CONNECT Proxy Support
  • Encryption/decryption using Triple DES and AES
  • Diffie-Hellman key exchange
  • MAC algorithm data integrity

About Us

Quality!

Dart Communications, located in upstate New York, has been designing and developing Internet communication components since 1994. More than a decade later, PowerTCP, PowerSNMP and PowerWEB for ASP.NET are International bestsellers to small businesses, consultants, and Fortune 500 companies.

Each targeted protocol is extensively researched by Dart and each product is tested and supported by consistent processes and customer feedback. Developers using our products can focus on creating the unique features they require rather than wasting weeks on research and unnecessary code writing.

Added Value

Dart Communications is committed to creating products that are of high quality, flexible, and easily implemented into a project. This process means maintaining meticulous documentation and a readily available support staff. In addition, Dart consistently processes feedback and requests, using this information for new product and feature development.

Dart's development team is also available for custom development projects relating to their product line. A customer may lack the time or background to complete a particular project as needed. Dart's team will draw on their protocol knowledge and experience to supply a quality solution within the timeframe required.

Expertise

Building components is about reliability. Developers need products that can stand up to use, that work as intended, and that go beyond original expectations. Our research tells us that users often change the scope of a project once it is underway. PowerTCP products are designed to scale to those increased expectations. To give you time to evaluate this claim prior to purchase, Dart supplies a fully functional trial for all of its products. See for yourself how a component can have both high-level functionality for quick and easy solutions, and also provide a low-level interface for customization.

In today's world, software developers are routinely asked to produce solutions using unfamiliar technologies, with little time allowed for research. When Internet Communications is part of your project, consider leveraging Dart's proven components to connect, encode, compress, encrypt and transfer data. Our goal is to help you build applications that work the first time, every time.

See Also

Reference
Sftp Component
Ssh Component

Documentation Version 4.9
© 2016 Dart Communications. All Rights Reserved.


Getting Started

Getting Started
See Also Send comments on this topic

Glossary Item Box

We highly recommend the user read this documentation and examine the sample applications included in the distribution in order to become familiar with the SSH and SFTP for .NET classes. For the most basic quick-start, create a new Windows Application project in Visual Studio, and see the Code Examples page for accessible examples to try.

Show Sample Applications

All .NET samples include C#, VC++/CLI and VB.NET versions.

.NET Sample | Description
MGet Demo | Demonstrates how to store multiple files from a local directory to an SFTP server using a wildcard expression.
MPut Demo | Demonstrates how to retrieve multiple files from an SFTP server to a local directory using a wildcard expression.
SFTP Client | A fully-featured FTP over SSH (SFTP) client application.
SSH Client | A user-interactive SSH client applications.

VB6 Sample | Description
Automated Client | Demonstrates execution of a simple blocking script.
SFTP Client | A fully-featured FTP over SSH (SFTP) client application.
SSH Client | A user-interactive SSH client applications.

Download the SSH and SFTP for .NET Sample Applications

Show Support Options

Our mission at Dart is to deliver high quality Internet connectivity solutions to Internet application developers. Our goal is to supplement these solutions with timely support resources that can help at many different levels.

You must have an active connection to the Internet to view these links.

Paid Support Options
Discusses the paid support options available.
Free Support Options
Provides access to free materials to help your development, including FAQS, online help files, tutorials, code snippets, online asp samples, and a free support forum.
Support Forum
Provides access to our support forum, monitored by our own development staff as time permits.
Dart Solutions
Discusses the custom development support offered by Dart Solutions.

Show Authenticode Signing

Dart installation executables are authenticode signed with a "Dart Communications" digital certificate to ensure against tampering during distribution.

Dart dlls included in the installation bin directory are .NET strong name signed, but not authenticode signed. These dlls are used by the sample applications and typically referenced in users' products.

For those users who require dlls signed by the author company (for example, for Windows logo compliance), dlls that have been signed with the "Dart Communications" digital certificate are also included in the product. These dlls are contained in the "Signed Distributables" sub-folder under the installation bin folder.

In accordance with the End-User Licensing Agreement, pre-compiled Dart dlls may NOT be signed with a user's own certificate. However, for users who wish to independently sign these dlls, Dart offers Enterprise licenses which allow for this. Please contact sales@dart.com for more information.

Show Requirements

Target Platforms: Microsoft .NET Framework 2.0 SP1

See Also

Sftp Component
Ssh Component


Licensing and Trial Operation

Licensing and Trial Operation
See Also Send comments on this topic

Glossary Item Box

Show Application Licensing

The licenses.licx File

All Dart classes require a licenses.licx file in the executing assembly’s project, containing an entry for each licensed class. Without the licenses.licx, a runtime license will not be generated and compiled into the assembly, and a license exception will be thrown at runtime.

When a licensed control or component is added to a project using the Visual Studio designer, a licenses.licx file will be automatically generated if one does not already exist, and an entry for the class added.

When developing an assembly with no design surface such as a console application, or when instantiating a licensed class in code, the licenses.licx file must be added manually. If a licenses.licx file is not present in the project, add a new text file named "licenses.licx" to the project (not the solution) from the Solution Explorer. Add a single line to the licenses.licx that includes the fully-specified class name and the assembly name, separated by a comma. For example:

Dart.Ssh.Ssh, Dart.Ssh

Web Site Projects

Web Site projects include an App_Licenses.dll that must be rebuilt when changes are made to the licenses.licx file or when migrating from trial to licensed operation. The App_Licenses.dll can be rebuilt by right-clicking on the licenses.licx file in the Solution Explorer and selecting the "Rebuild Runtime Licenses" option.

Powershell and other Scripting Environments

Because PowerShell does not execute compiled code and its scripts are generally modifiable by end users, a development or trial license is required on any machine executing scripts. If an environment other than PowerShell is being used or another distribution method is desired, please contact support@dart.com for additional options.

Other Development Environments

For compilation environments that do not recognize the licenses.licx file, a license resource may be generated with the .NET or MONO lc.exe utility on a licensed machine and added to the project as an embedded resource, or linked during compilation using the appropriate resource switch. For specific instructions, check with the environment's manufacturer.

Show Development Platform Licensing

Trial Operation

Dart components include a 30-day introductory trial period. With the exception of trial messages and trial runtime license expiration exceptions, runtime trial operation is the same as licensed operation.

A 7-day runtime license will be embedded in assemblies compiled during the trial period. After 7 days, Dart classes will throw an exception and the assembly will no longer function. The 7-day runtime license can be reset within the 30-day trial period by recompiling the project.

A trial installation can be licensed by purchasing and activating a Product Key.

Licensed Operation

A Developer License is required to compile licensed assemblies. A valid Product Key is required to generate a Developer License. Each Developer License is machine and version specific; major and minor version increments (for example, 4.0, 4.1 and 5.0) require separate Product Keys and Developer Licenses, build and revision do not.

Product and license upgrades are available through the Customer Center to developers with an active subscription.

Obtaining a Developer License

Run the included license activation utility from the Activate PowerTCP SSH and SFTP for .NET 4.9 shortcut in the product's Start Menu program group. The utility will guide you through the registration and activation process. Once complete, the Developer License file will be emailed to you. Copy the dartlic file attached to the email to the following location:

Program Files (x86) \ Dart \ PowerTCP SSH and SFTP for .NET \ 4.9 \ bin

This location is also accessible from the 'Binaries Folder' shortcut in the product's Start Menu program group.

Note: On UAC-enabled operating systems, the dartlic file may need to be saved to a non-UAC-protected location before copying it to the aforementioned location.

If Internet access is not available on the development machine, the activation utility provides a URL for activating the license on a machine with Internet access so that the Developer License can be retrieved and copied to the development machine.

Note: All licensing messages and exceptions are logged to the Application Event Log with "Dart Components" as the event source. If the "Dart Components" event source could not be created, messages are logged under the ".NET Components" event source. The Application Event Log can be examined for licensing messages and exceptions in situations where message boxes cannot be displayed or no GUI is present.

Show Deployment

Dart components support xcopy deployment and do not require any files other than the component dll and compiled project assemblies.

See Also

Sftp Component
Ssh Component


Licensing in COM Environments

Licensing in COM Environments
See Also Send comments on this topic

Glossary Item Box

This Dart product exposes an interface that can be used in COM environments, including VB6. Since the Microsoft .NET licensing model will not add a license resource to non-.NET applications, this product employs an external runtime license model in COM environments. The developer must create a license file for each developed application, to be deployed with the application.

Creating and Deploying the Runtime License File

The process for creating and deploying a runtime license file is as follows:

  1. Activate the product license as described in the "Licensing the Product" section of the "Licensing and Trial Operation" page. This installs the developer license on your development machine.
  2. Create the application that uses the COM interface. If your development environment has a compile step, build the executable.
  3. Create the runtime license file. There are two options:
    • Run the executable on the development machine. This will automatically generate the license file.
    • Use the dartcomlc.exe command-line application, accessible from the "Bin" folder shortcut in the Start Menu. This utility takes two parameters - dllPath (the referenced Dart dll) and appPath (the licensed application). For example:

      dartcomlc.exe Dart.Ssh.dll MyApplication.exe

    The filename for the generated license file will include the dll name and the application name. For example:

    Dart.Ssh.MyApplication.license

  4. Deploy this file to the same directory as the application on the target machine.
  5. Deploy the Dart.*.dll to the target machine. Use the Microsoft regasm.exe utility to COM register the assembly. For example:

    regasm Dart.Ssh.dll /codebase /tlb

This process is only necessary when employing the COM interface to a Dart component. .NET applications should use the native .NET class interface, which embeds the licensing resource to the application, as described on the "Licensing and Trial Operation" page.

Note: The runtime license file is tied to the binary content of the executable, and must be regenerated each time the executable is modified. VB6 includes timestamp information in compiled executables, so even if there are no code changes, the license file must be regenerated each time an executable is recompiled by VB6.

Trial Operation

If the COM interface is used without an activated product license, the product operates as a free trial. The dartcomlc.exe utility can be used to create a trial runtime license. When deployed with an application, the application will run in trial mode, just as with native .NET applications (see the "Trial Operation" section of the "Licensing and Trial Operation" page).

If no runtime file exists, the application will run, but present periodic nag messages with instructions for creating a runtime trial license.

A trial message is always displayed when a 7-Day Trial license is created.

See Also

Sftp Component
Ssh Component


Code Examples

Code Examples
See Also Send comments on this topic

Glossary Item Box

The following lists direct links to pages in this help file that contain easy-to-follow code examples.

Use Start and Marshal to work asynchronously in a Windows Forms application

Get a file from an SFTP server

Put a file onto an SFTP server

Get an entire directory from an SFTP server

Use the Authenticate method and Challenge event to complete keyboard-interactive login

Display the banner the server sends during authentication

See Also

Sftp Component
Ssh Component


Designed for Modern Applications

Designed for Modern Applications
See Also Send comments on this topic

Glossary Item Box

PowerTCP SSH and SFTP for .NET exposes a modern multi-threaded design with technical advantages over competing products.

Async Methods

The async methods (BeginXXX) seen in competing products reflect an antiquated single-threaded design model that denies the benefits of multi-threaded power. Please read on to see how PowerTCP SSH and SFTP for .NET delivers multi-threaded power to your application without adding the complexity that is often associated with multi-threading techniques.

Operation on the client side of the SSH client/server model is inherently command driven, so SSH and SFTP for .NET provides a simple Start(delegate) method that executes the body of your delegate on a worker thread. This straight-forward concept provides a flexible technique for using PowerTCP in any application environment.

This design eliminates the need for BeginXXX methods and EndXXX events. There is a clean interface with one method for each function and several advantages are immediately realized:

Efficiency. Methods are designed to efficiently block on socket receive operations (the thread sleeps until bytes are received). This results in the most robust and efficient design possible.

Reusable code. Your delegate(s) can be used in applications both with and without a UI. It is no longer necessary to use BeginFoo for Windows Forms applications, and (the blocking) Foo for services, web applications and console applications.

Lower life-cycle cost. Code is written sequentially because there is no UI message pump to consider. It is not necessary to write code for numerous event handlers. Your code is self-documenting, easier to debug and maintain, and has a lower life-cycle cost.

Easy-to-implement parallel operation. Worker threads are easily spawned, supporting intensively parallel operations. Alternatively, serial operation is easily implemented by using just one thread. Flexibility of design is key.

No more state machine. It is not necessary to track state in event handlers. Take the simple case where the following sequence takes place:

  • Receive data R1
  • Send data S1
  • Receive data R2
  • Send data S2

Using BeginXXX, an event is raised when data is received and a state machine is required (if R1 is received then send S1, else if R2 is received then send S2). Using a single worker thread, the operation is coded in simple, declarative steps (Receive R1, Send S1, Receive R2, Send S2).

No More Pseudo-Blocking

Competing products use "pseudo-blocking" to process UI events while the method blocks. Without pseudo-blocking overhead methods are faster and more efficient. Also, re-entrancy problems (caused when UI messages are processes while a communication method is in progress) are no longer possible.

Developing Applications Without a UI

Developing console applications, web applications, services and other applications without a UI is as easy as ever. Sequential code performs efficiently. If parallel operation is desired, Start(delegate) can be used to execute code in any delegate body in parallel.

Developing Applications With a UI

Developing Windows Forms applications is now just as easy as writing applications without a UI. One method (the delegate) can be used in both types of applications. The only difference is that a UI app uses Start(delegate) to spawn a worker thread upon which the method executes, and any data needed by the UI must be marshaled to the UI thread. To this end, PowerTCP components include Start() and Marshal() convenience methods.

The Start Method

Use the Start method to execute one or more functions on a new worker thread, so the UI is not blocked during operation. The syntax for this method is simple (C# and VB code snippets follow):

C# Copy Code
ssh1.Start(myBlockingFunction, myObject); //Can also be called without passing an object

private void myBlockingFunction(Ssh ssh, object myObject)
{
   ...
}

Visual Basic Copy Code
ssh1.Start(AddressOf myBlockingFunction, myObject) 'Can also be called without passing an object

Private Sub myBlockingFunction(ByVal ssh As Ssh, ByVal myObject As Object)
   ...
End Sub

Marshaling Data

It is often necessary to pass information from a worker thread to update an element on the UI thread. Use the Marshal method for this purpose. Each Marshal overload is paired with an event that is raised on the UI thread. For example (C# and VB code snippets follow):

C# Copy Code
//Receive data and marshal it to the UI
SessionStream session = ssh1.StartShell();
byte[] buf = newbyte[1024];
Data data;
do
{
    data = session.Read(buf);
    if (data != null) ssh1.Marshal(data, session, "", null);
} while (data != null);

private void ssh1_Data(object sender, SshDataEventArgs e)
{
    //Display data marshaled from a worker thread
    display(e.Data);
}
Visual Basic Copy Code
'Receive data and marshal it to the UI
Dim session As SessionStream = ssh1.StartShell()
Dim buf() As Byte = newbyte(1024)
Dim data As Data
Do
    data = session.Read(buf)
    If data IsNot Nothing Then
        ssh1.Marshal(data, session, "", Nothing)
    End If
Loop While data IsNot Nothing

Private Sub ssh1_Data(ByVal sender As Object, ByVal e As SshDataEventArgs)
    'Display data marshaled from a worker thread
    display(e.Data)
End Sub

Typical Use

In the first example, the developer wants to execute a series of methods without interfering with the user-interface. A button, textbox and the PowerTCP component are added to the form. Pressing the button will initiate a session with communication displayed in the textbox. The automateSession function, which could be reused in a non-UI application, is passed to Start and executes on a worker thread (C# and VB code snippets follow).

C# Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
    //Event handlers were added in the designer
    //Start the process on a worker thread so the UI is not blocked
    ssh1.Start(automateSession, null);
}

private void automateSession(object notUsed)
{
    //This function executes on a worker thread
    try
    {
        //Connect
        ssh1.Connection.RemoteEndPoint.HostNameOrAddress = "myServer";
        ssh1.Connect();

        //Perform authentication (using username/password)
        ssh1.Authenticate("myUsername", "myPassword");

        //Start session
        SessionStream session = ssh1.StartShell();

        //Read prompt
        ssh1.Marshal(session.Read("$", null), session, "", null);

        //Send a list command
        session.Write("ls -la\r");

        //Wait for prompt, marshal data to the UI thread
        ssh1.Marshal(session.Read("$", null), session, "", null);

        //Send an exit command; server will close the connection
        session.Write("exit\r");

        //Read any remaining data before the shutdown
        ssh1.Marshal(session.ReadToEnd(), session, "", null);

        //Close session and connection
        session.Close();
        ssh1.Close();
    }
    catch (Exception ex)
    {
        //Report errors to the UI thread
        ssh1.Marshal(ex);
    }
}
private void ssh1_Data(object sender, SshDataEventArgs e)
{
    //This event is raised on the UI thread
    //Add data received to the textbox
    textBox1.AppendText(e.Data.ToString());
}
private void ssh1_Error(object sender, ErrorEventArgs e)
{
    //Add error messages to the textbox
    textBox1.AppendText(e.GetException().Message);
}

private void ssh1_StateChanged(object sender, System.EventArgs e)
{
    //Change appearance of textbox when connected
    textBox1.BackColor = (ssh1.State == Dart.Ssh.ConnectionState.Closed)
        ? SystemColors.ControlDark
        : SystemColors.ControlLight;
}

Visual Basic Copy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    'Event handlers were added in the designer
    'Start the process on a worker thread so the UI is not blocked
    ssh1.Start(AddressOf automateSession, Nothing)
End Sub

Private Sub automateSession(ByVal notUsed As Object)
    'This function executes on a worker thread
    Try
        'Connect
        ssh1.Connection.RemoteEndPoint.HostNameOrAddress = "myServer"
        ssh1.Connect()

        'Perform authentication (using username/password)
        ssh1.Authenticate("myUsername", "myPassword")

        'Start session
        Dim session As SessionStream = ssh1.StartShell()

        'Read prompt
        ssh1.Marshal(session.Read("$", Nothing), session, "", Nothing)

        'Send a list command
        session.Write("ls -la" & vbCr)

        'Wait for prompt, marshal data to the UI thread
        ssh1.Marshal(session.Read("$", Nothing), session, "", Nothing)

        'Send an exit command; server will close the connection
        session.Write("exit" & vbCr)

        'Read any remaining data before the shutdown
        ssh1.Marshal(session.ReadToEnd(), session, "", Nothing)

        'Close session and connection
        session.Close()
        ssh1.Close()
    Catch ex As Exception
        'Report errors to the UI thread
        ssh1.Marshal(ex)
    End Try
End Sub

Private Sub ssh1_Data(ByVal sender As Object, ByVal e As SshDataEventArgs)
    'This event is raised on the UI thread
    'Add data received to the textbox
    textBox1.AppendText(e.Data.ToString())
End Sub

Private Sub ssh1_Error(ByVal sender As Object, ByVal e As ErrorEventArgs)
    'Add error messages to the textbox
    textBox1.AppendText(e.GetException().Message)
End Sub

In the second example, the developer wants to receive data whenever it is available, again without interfering with the UI. Event handlers (not shown) are implemented as in the first example (C# and VB code snippets follow).

C# Copy Code
private void button1_Click(object sender, EventArgs e)
{
    //Start the process on a worker thread so the UI is not blocked
    ssh1.Start(receiveData, null);
}

private void receiveData(object notUsed)
{
    //This function executes on a worker thread
    try
    {
        //Connect to the server, marshal data to the UI thread
        ssh1.Connection.RemoteEndPoint.HostNameOrAddress = "myServer";
        ssh1.Connect();

        //Perform authentication (using username/password)
        ssh1.Authenticate("myUsername", "myPassword");

        //Start session
        SessionStream session = ssh1.StartShell();

        //Receive data when it is sent by the remote host
        byte[] buffer = new byte[1024];
        while (ssh1.State == Dart.Ssh.ConnectionState.Connected)
            ssh1.Marshal(session.Read(buffer), session, "", null);
    }
    catch (Exception ex)
    {
        //Report errors to the UI thread
        ssh1.Marshal(ex);
    }
}

Visual Basic Copy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
    'Start the process on a worker thread so the UI is not blocked
    ssh1.Start(AddressOf receiveData, Nothing)
End Sub

Private Sub receiveData(ByVal notUsed As Object)
    'This function executes on a worker thread
    Try
        'Connect to the server, marshal data to the UI thread
        ssh1.Connection.RemoteEndPoint.HostNameOrAddress = "myServer"
        ssh1.Connect()

    'Perform authentication (using username/password)
    ssh.Authenticate("myUsername", "myPassword")

    'Start session
    Dim session As SessionStream = ssh1.StartShell()

    'Receive data when it is sent by the remote host
    Dim buffer() As Byte = New Byte(1023){}
    Do While ssh1.State = Dart.Ssh.ConnectionState.Connected
        ssh1.Marshal(session.Read(buffer), session, "", Nothing)
    Loop
    Catch ex As Exception
        'Report errors to the UI thread
        ssh1.Marshal(ex)
    End Try
End Sub

See Also

Sftp Component
Ssh Component


MVC Design in Applications

MVC Design in Applications
See Also Send comments on this topic

Glossary Item Box

Extending the Model-View-Controller Design Philosophy to Applications

One feature of the new version 4 components is the ease with which applications can be developed using a Model-View-Controller (MVC) design. MVC is a design philosophy that isolates application business logic from the user interface. The following white paper offers a detailed discussion of this design and its application to the PowerTCP and PowerSNMP components:

http://www.dart.com/articles_mvc.aspx

MVC design has been incorporated into some of the more sophisticated PowerTCP and PowerSNMP sample applications, providing two key benefits:

Separation of protocol logic from the user interface

Encapsulating protocol logic in a class separates it from any user interface, providing clean code that can be reused in other projects, with other interfaces.

The Sftp Listview Client sample provides a nice demonstration of this separation. The sample implements an SftpModel class where all code pertaining to FTP logic - logging in, navigating accounts, transferring files - resides. The SFTP functionality can easily be extended or modified without affecting the UI. This class can easily be reused in other applications, with other interfaces. In addition, encapsulating the data and logic pertaining only to SFTP functions provides a cleaner project that is easier to digest and maintain.

Simplified storage of runtime state information

Saving runtime state information and persisting this information when the application is terminated is a key feature of many applications. Model classes can be used to facilitate this.

The Sftp Listview Client sample is a typical example.

First, the sample's SftpModel class provides properties for storing runtime data, including session data and security settings. This class provides a "ground truth" for the state of the application, instead of the interface itself holding this information. The interface provides a means for updating the model, but is itself "dumb." Also, the encapsulated data can be easily passed to objects such as Settings and Connection forms, which are implemented as interfaces for updating the information contained within the model.

Second, as a serializable class, the model provides a means for easily persisting settings when the application is terminated. In the past, PowerTCP and PowerSNMP samples dedicated large chunks of code for saving and loading application settings, usually in the registry. PowerTCP 4 components have taken a different approach, focusing instead on providing help for serialization. This includes helper functions for Serializing and Deserializing objects to and from streams, as well as providing state information in serializable objects that can be easily stored. The SftpModel class stores a LoginData object which includes remote HostNameOrAddress, Port, Username, Password, Security information and much more.

The sample applications are available as an option during the product installation, and can also be downloaded by clicking on the "Download Samples" link in the Start Menu.

See Also

Sftp Component
Ssh Component


SSH Protocol
See Also Send comments on this topic

Glossary Item Box

SSH Protocol

The Secure Shell (SSH) protocol is used to access shell accounts securely. It was conceived as a replacement for insecure telnet. The protocol is most often used for logging in to remote systems and executing commands. Several sessions may be maintained over a single SSH connection, which is typically made to the well-known TCP port 22. The current standard is SSH-2.

SSH uses public-key cryptography, in which asymmetric key algorithms create a public key and a secret private key. Data encrypted with the public key can only be decrypted with the private key. The secret key is shared between server and client using the Diffie-Helmman Key Exchange.

Data integrity is maintained using Message Authentication Codes (MAC). A Mac tag created using the secret key and the message is sent with the message. The remote system uses the received message to create a tag for comparison.

Establishing an SSH Connection

SSH connections are established over the following steps:

  1. A cryptographic handshake confirms the server identity.
  2. Data is encrypted using a symmetric cipher.
  3. The client authenticates itself.

Architecture

SSH is architected in three layers:

  1. Transport Layer. This layer handles the key exchange, server authentication, sets up encryption, employs compression, and performs data integrity verification.
  2. Authentication Protocol Layer. This layer handles client authentication. Common authentication methods are simple password, public key (see Public Key Generation), and keyboard-interactive, in which the user keys in responses to server prompts.
  3. Connection Protocol Layer. This layer hosts channels for interactive login sessions, remote execution of commands, and forwarded TCP/IP and X11 connections.

SFTP (SSH File Transfer Protocol)

SFTP is an extension of SSH, providing secure file access, transfer and management functionality. Common actions include getting and putting files, changing permissions of files, creating directories, listing directories, and deleting files and directories. SFTP is a different protocol than FTPS (FTP over SSL). While both protocols provide a means for secure file transfer, SFTP does not utilize the standard FTP protocol employed by FTPS.

Differences with FTPS

The major differences between SFTP and FTPS include:

  1. SFTP only employs a single connection, unlike FTPS which uses two (one for commands and one for data), which makes it much more firewall-friendly. Also, the SFTP connection is always secure.
  2. SFTP has a uniform directory listing format, unlike FTPS which had different listing formats for UNIX and DOS systems.
  3. SFTP includes operations for setting file permissions and attributes as part of the standard.
  4. SFTP uses a binary encoding, which is not human-readable like FTPS commands.

See Also

Sftp Component
Ssh Component


Public Key Generation Using PuTTYgen

Public Key Generation Using PuTTYgen
See Also Send comments on this topic

Glossary Item Box

Public Key Authentication

Public Key Authentication uses a public and private key to authenticate a client. The client generates a signature using the private key. This signature is verified with the public key on the server. It is important to note that a signature cannot be forged without the private key. Also each signature is unique and cannot be reused. This policy of signature generation and non-reuse makes Public Key Authentication a more secure login system than the standard username/password login, which is easily defeated by a man-in-the-middle attack.

PuTTYgen Key Generation

There is a free utility called PuTTYgen that can be used to generate key pairs. This utility can be downloaded from the PuTTY Download Page. Run PuTTYgen and follow these steps:

Generate the Key

  1. Click on "Key" in the file menu and select either "SSH-2 RSA" or "SSH-2 DSA."
  2. Click on "Key->Generate key pair" in the file menu and follow the on-screen instructions.
  3. Optional: Once key generation is complete, enter a passphrase to protect the key. Enter a comment to help identify the key.

Export the Key for Use

  1. Click on "Conversions->Export OpenSSH key." This will export the private portion of the key pair, to use with the PowerTCP component.
  2. Click on the “Save public key” button to export the public key to a file which must be copied to the server.

Copy the Key to the Server

These instructions apply to a linux server, you will need to contact your IT department for specific instructions for other Operating Systems.

  1. Log in to the server with an SFTP or SCP client.
  2. Transfer the public key file to the user home directory on the server.
  3. Log in to the server using an SSH Client.
  4. Navigate to the directory the public key was uploaded to and enter the following command:
    cat publickey.pem >> ~/.ssh/authorized_keys

See Also

Sftp Component
Ssh Component


FIPS Compliance

FIPS Compliance
Send comments on this topic

Glossary Item Box

Federal Information Processing Standard 140 (FIPS 140) defines approved cryptographic algorithms for computer systems used by the U.S. federal government. The current version of the standard is FIPS 140-2. Cryptographic algorithms can be validated as FIPS certified through the Cryptographic Module Validation Program (CMVP).

Applications using PowerTCP SSH and SFTP for .NET are by default FIPS 140-2 compliant. Only FIPS certified algorithms are used when required by the system's security policy, even if the Connection.Client2ServerCiphers array is changed by the developer. Dart offers Subscriptions which include source code for users who wish to obtain FIPS validation through a CMVP vendor.

The following registry settings are used to inform applications to only use cryptographic algorithms that are FIPS 140 compliant. To enable these settings, set their values to 1.

For Windows 2008, Vista, Windows 7 and Windows 8:

HKLM\System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy\Enabled

For Windows Server 2003 and XP:

HKLM\System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy


Dart.Ssh Namespace

Dart.Ssh Namespace
See Also Inheritance Hierarchy Send comments on this topic

Glossary Item Box

Classes

 | Class | Description
Class | BannerEventArgs | Provides data for the SshConnection.Banner event.
Class | BaseEventArgs | Base class for event arguments.
Class | BaseStream | Abstract base class for ZipEncryptingStream, ZipDecryptingStream, AesEncryptingStream, AesDecryptingStream, UtilityStream and ZStream.
Class | ChallengeEventArgs | Provides data for the SshConnection.Challenge event.
Class | ChannelPacket | Class used to interpret the contents of a SSH_MSG_CHANNEL_DATA packet.
Class | ComponentBase | Base class for PowerTCP Components.
Class | Connection | Establishes an encrypted TCP/IP connection to an SSH-2 server.
Class | ConnectionInfo | Provides details about an established SSH-2 connection.
Class | CopyResult | Provides the results of a copy operation (in uncompressed bytes).
Class | DartLicenseException | The base class for all Dart component license exceptions.
Class | Data | Encapsulates data read or written.
Class | DataEventArgs | Provides data for reporting events.
Class | DebugData | Provides Debug information.
Class | DebugEventArgs | Provides data for the Debug event.
Class | DHGexParameters | Used to specify parameters for the diffie-hellman group exchange.
Class | ErrorEventArgs | Provides data for the Error event.
Class | HostKeyEventArgs | Provides data for the SshConnection.HostKey event.
Class | HttpProxyData | The required data for connecting through an HTTP proxy.
Class | HttpProxyException | May be thrown while establishing a connection through an HTTP proxy.
Class | IPEndPoint | Allows user to specify a range of IPEndPoints for local binding. Also resolves hostnames and saves them for future use.
Class | ListEntry | A ListEntry returned by Sftp.List.
Class | ListProgress | Provides progress information during a copy operation for a list of files and folders
Class | LocalPortForwarder | Forwards TCP/IP connections to a local port via the secure tunnel to another host.
Class | LogEventArgs | Provides data for the SshConnection.Log event.
Class | LoginData | Contains connection data for a server using generic username/password authentication.
Class | NegotiateException | Thrown when KEX parameter negotiation fails.
Class | Optimizations | Contains properties for optimizing file transfer speed.
Class | Packet | Base class used to interpret the contents of an SSH-2 packet.
Class | ProgressEventArgs | Provides progress information to the user as a copy operation proceeds.
Class | RemoveResult | Provides the results of a requested remove operation.
Class | Segment | Used to describe a byte[] segment that holds data.
Class | Session | Session over which a single program is remotely executed.
Class | SessionStream | Provides a stream interface to a Session.
Class | Sftp | The Sftp Component represents an SFTP client connection tunneled over a SSH-2 connection.
Class | SftpException | Wraps error messages sent by the SFTP server.
Class | SftpFileAttributes | Provides detailed information about a file on the server. Not all fields may/must be present.
Class | SftpPacket | Class used to interpret the contents of an SFTP packet.
Class | SocketBase | Base class for PowerTCP Components.
Class | Ssh | The Ssh component is used to manage one or more SSH sessions.
Class | SshConnection | SshConnection provides connection and authentication methods and properties for Sftp and Ssh classes.
Class | SshDataEventArgs | Provides data for the Data event.
Class | SshLoginData | Used to hold SSH login information.
Class | UserStateEventArgs | Provides data for ComponentBase.UserState. Base class for EventArgs that have Message and UserState properties.
Class | ZStream | Used as the abstract base class for CompressingStream and InflatingStream.
Class | ZStreamException | Indicates a failure in ZLIB compression processing.

Interfaces

 | Interface | Description
Interface | ServerHostKeyVerifier | A callback interface used to implement a client-specific method of checking server host keys.

Delegates

 | Delegate | Description
Delegate | DebugEventHandler | Represents the method that will handle an event containing debug data.
Delegate | ErrorEventHandler | Represents the method that will handle Error event raised by the user calling Marshal.
Delegate | EventHandler | Represents the method that will handle an event indicating the State property value has changed.
Delegate | LogEventHandler | Describe the handler used for the Log event.
Delegate | Sftp.ProgressEventHandler | Represents the method that will handle an event indicating a block of data has been copied.
Delegate | Ssh.SshDataEventHandler | Represents the method that will handle an event raised by the user calling the Marshal method.
Delegate | SshConnection.BannerEventHandler | Represents the method that will handle an event raised when the server presents a banner to the client during authentication.
Delegate | SshConnection.ChallengeEventHandler | Represents the method that will handle an event indicating the server is challenging the client with an interactive question or questions.
Delegate | SshConnection.HostKeyEventHandler | Represents the method that will handle an event raised when the server presents its host key for verification.
Delegate | UserStateEventHandler | Represents the method that will handle ComponentBase.UserState event raised by the user calling Marshal.

Enumerations

 | Enumeration | Description
Enumeration | ConnectionState | Enumerates the possible values of the connection state.
Enumeration | CopyAction | Enumerates the copy action desired or completed.
Enumeration | CopyMode | Enumerates the type of copy desired or performed.
Enumeration | CopyStatus | Enumerates the status of a Copy action.
Enumeration | DataDirection | Enumerates the direction of data flow.
Enumeration | PacketMessage | Enumerates the messages used by SSH-2.
Enumeration | PacketType | Type of SFTP packet
Enumeration | SftpMessage | Enumerates SFTP message types.
Enumeration | ThreadingModel | Specifies the available threading models.

See Also

Reference

Dart.Ssh Assembly


BannerEventArgs Class

[image]
PowerTCP SSH and SFTP for .NET
BannerEventArgs Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : BannerEventArgs Class

Glossary Item Box

Provides data for the SshConnection.Banner event.

Object Model

BannerEventArgs Class

Syntax

Visual Basic (Declaration)
Public Class BannerEventArgs
   Inherits System.EventArgs
Visual Basic (Usage) Copy Code
Dim instance As BannerEventArgs
C#
public class BannerEventArgs : System.EventArgs
Managed Extensions for C++
public __gc class BannerEventArgs : public System.EventArgs
C++/CLI
public ref class BannerEventArgs : public System.EventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
Dart.Ssh.BannerEventArgs

See Also

Reference

BannerEventArgs Members
Dart.Ssh Namespace


BannerEventArgs Class Members

[image]
PowerTCP SSH and SFTP for .NET
BannerEventArgs Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : BannerEventArgs Class

Glossary Item Box

The following tables list the members exposed by BannerEventArgs.

Public Properties

 | Name | Description
Public Property | Accept | Set to false to refuse the banner and cancel authentication. Defaults to true.
Public Property | BannerText | Gets the text of the banner sent by the server.
Top

See Also

Reference

BannerEventArgs Class
Dart.Ssh Namespace


BannerEventArgs Class Properties

[image]
PowerTCP SSH and SFTP for .NET
BannerEventArgs Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : BannerEventArgs Class

Glossary Item Box

For a list of all members of this type, see BannerEventArgs members.

Public Properties

 | Name | Description
Public Property | Accept | Set to false to refuse the banner and cancel authentication. Defaults to true.
Public Property | BannerText | Gets the text of the banner sent by the server.
Top

See Also

Reference

BannerEventArgs Class
Dart.Ssh Namespace


Accept Property

[image]
PowerTCP SSH and SFTP for .NET
Accept Property
See Also Send comments on this topic
Dart.Ssh Namespace > BannerEventArgs Class : Accept Property

Glossary Item Box

Set to false to refuse the banner and cancel authentication. Defaults to true.

Syntax

Visual Basic (Declaration)
Public Property Accept As Boolean
Visual Basic (Usage) Copy Code
Dim instance As BannerEventArgs
Dim value As Boolean

instance.Accept = value

value = instance.Accept
C#
public bool Accept {get; set;}
Managed Extensions for C++
public: __property bool get_Accept();
public: __property void set_Accept(
   bool value
);
C++/CLI
public:
property bool Accept {
   bool get();
   void set (    bool value);
}

See Also

Reference

BannerEventArgs Class
BannerEventArgs Members


BannerText Property

[image]
PowerTCP SSH and SFTP for .NET
BannerText Property
See Also Send comments on this topic
Dart.Ssh Namespace > BannerEventArgs Class : BannerText Property

Glossary Item Box

Gets the text of the banner sent by the server.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property BannerText As String
Visual Basic (Usage) Copy Code
Dim instance As BannerEventArgs
Dim value As String

value = instance.BannerText
C#
public string BannerText {get;}
Managed Extensions for C++
public: __property string* get_BannerText();
C++/CLI
public:
property String^ BannerText {
   String^ get();
}

See Also

Reference

BannerEventArgs Class
BannerEventArgs Members


BaseEventArgs Class

[image]
PowerTCP SSH and SFTP for .NET
BaseEventArgs Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : BaseEventArgs Class

Glossary Item Box

Base class for event arguments.

Object Model

BaseEventArgs Class

Syntax

Visual Basic (Declaration)
Public Class BaseEventArgs
   Inherits System.EventArgs
Visual Basic (Usage) Copy Code
Dim instance As BaseEventArgs
C#
public class BaseEventArgs : System.EventArgs
Managed Extensions for C++
public __gc class BaseEventArgs : public System.EventArgs
C++/CLI
public ref class BaseEventArgs : public System.EventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
Dart.Ssh.BaseEventArgs
Dart.Ssh.DebugEventArgs
Dart.Ssh.LogEventArgs
Dart.Ssh.ProgressEventArgs

See Also

Reference

BaseEventArgs Members
Dart.Ssh Namespace


BaseEventArgs Class Members

[image]
PowerTCP SSH and SFTP for .NET
BaseEventArgs Class Members
See Also Send comments on this topic
Dart.Ssh Namespace : BaseEventArgs Class

Glossary Item Box

The following tables list the members exposed by BaseEventArgs.

Public Constructors

 | Name | Description
Public Constructor | BaseEventArgs Constructor |
Top

See Also

Reference

BaseEventArgs Class
Dart.Ssh Namespace


BaseEventArgs Constructor

[image]
PowerTCP SSH and SFTP for .NET
BaseEventArgs Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > BaseEventArgs Class : BaseEventArgs Constructor

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As New BaseEventArgs()
C#
public BaseEventArgs()
Managed Extensions for C++
public: BaseEventArgs();
C++/CLI
public:
BaseEventArgs();

See Also

Reference

BaseEventArgs Class
BaseEventArgs Members


BaseStream Class

[image]
PowerTCP SSH and SFTP for .NET
BaseStream Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : BaseStream Class

Glossary Item Box

Abstract base class for ZipEncryptingStream, ZipDecryptingStream, AesEncryptingStream, AesDecryptingStream, UtilityStream and ZStream.

Object Model

BaseStream Class

Syntax

Visual Basic (Declaration)
Public MustInherit Class BaseStream
   Inherits System.IO.Stream
Visual Basic (Usage) Copy Code
Dim instance As BaseStream
C#
public abstract class BaseStream : System.IO.Stream
Managed Extensions for C++
public __gc abstract class BaseStream : public System.IO.Stream
C++/CLI
public ref class BaseStream abstract : public System.IO.Stream

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.IO.Stream
Dart.Ssh.BaseStream
Dart.Ssh.ZStream

See Also

Reference

BaseStream Members
Dart.Ssh Namespace


BaseStream Class Members

[image]
PowerTCP SSH and SFTP for .NET
BaseStream Class Members
See Also Properties Methods Send comments on this topic
Dart.Ssh Namespace : BaseStream Class

Glossary Item Box

The following tables list the members exposed by BaseStream.

Public Properties

 | Name | Description
Public Property | CanRead | Overridden.
Public Property | CanSeek | Overridden.
Public Property | CanTimeout | Gets a value that determines whether the current stream can time out. (Inherited from System.IO.Stream)
Public Property | CanWrite | Overridden.
Public Property | Length | Overridden.
Public Property | Position | Overridden.
Public Property | ReadTimeout | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out. (Inherited from System.IO.Stream)
Public Property | WriteTimeout | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out. (Inherited from System.IO.Stream)
Top

Public Methods

 | Name | Description
Public Method | BeginRead | Begins an asynchronous read operation. (Consider using System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | BeginWrite | Begins an asynchronous write operation. (Consider using System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | Close | Overridden. Calls InnerStream.Close.
Public Method | CopyTo | Overloaded. Reads the bytes from the current stream and writes them to another stream. (Inherited from System.IO.Stream)
Public Method | CopyToAsync | Overloaded. Asynchronously reads the bytes from the current stream and writes them to another stream. (Inherited from System.IO.Stream)
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Dispose | Overloaded. Releases all resources used by the System.IO.Stream. (Inherited from System.IO.Stream)
Public Method | EndRead | Waits for the pending asynchronous read to complete. (Consider using System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | EndWrite | Ends an asynchronous write operation. (Consider using System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | Flush | Overridden.
Public Method | FlushAsync | Overloaded. Asynchronously clears all buffers for this stream and causes any buffered data to be written to the underlying device. (Inherited from System.IO.Stream)
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Read | When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (Inherited from System.IO.Stream)
Public Method | ReadAsync | Overloaded. Asynchronously reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (Inherited from System.IO.Stream)
Public Method | ReadByte | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. (Inherited from System.IO.Stream)
Public Method | Seek | Overridden.
Public Method | SetLength | Overridden.
Public Method | Write | When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (Inherited from System.IO.Stream)
Public Method | WriteAsync | Overloaded. Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (Inherited from System.IO.Stream)
Public Method | WriteByte | Writes a byte to the current position in the stream and advances the position within the stream by one byte. (Inherited from System.IO.Stream)
Top

Protected Methods

 | Name | Description
Protected Method | CreateWaitHandle | Allocates a System.Threading.WaitHandle object. (Inherited from System.IO.Stream)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | ObjectInvariant | Provides support for a System.Diagnostics.Contracts.Contract. (Inherited from System.IO.Stream)
Top

See Also

Reference

BaseStream Class
Dart.Ssh Namespace


BaseStream Class Methods

[image]
PowerTCP SSH and SFTP for .NET
BaseStream Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : BaseStream Class

Glossary Item Box

For a list of all members of this type, see BaseStream members.

Public Methods

 | Name | Description
Public Method | BeginRead | Begins an asynchronous read operation. (Consider using System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | BeginWrite | Begins an asynchronous write operation. (Consider using System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | Close | Overridden. Calls InnerStream.Close.
Public Method | CopyTo | Overloaded. Reads the bytes from the current stream and writes them to another stream. (Inherited from System.IO.Stream)
Public Method | CopyToAsync | Overloaded. Asynchronously reads the bytes from the current stream and writes them to another stream. (Inherited from System.IO.Stream)
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Dispose | Overloaded. Releases all resources used by the System.IO.Stream. (Inherited from System.IO.Stream)
Public Method | EndRead | Waits for the pending asynchronous read to complete. (Consider using System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | EndWrite | Ends an asynchronous write operation. (Consider using System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | Flush | Overridden.
Public Method | FlushAsync | Overloaded. Asynchronously clears all buffers for this stream and causes any buffered data to be written to the underlying device. (Inherited from System.IO.Stream)
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Read | When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (Inherited from System.IO.Stream)
Public Method | ReadAsync | Overloaded. Asynchronously reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (Inherited from System.IO.Stream)
Public Method | ReadByte | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. (Inherited from System.IO.Stream)
Public Method | Seek | Overridden.
Public Method | SetLength | Overridden.
Public Method | Write | When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (Inherited from System.IO.Stream)
Public Method | WriteAsync | Overloaded. Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (Inherited from System.IO.Stream)
Public Method | WriteByte | Writes a byte to the current position in the stream and advances the position within the stream by one byte. (Inherited from System.IO.Stream)
Top

Protected Methods

 | Name | Description
Protected Method | CreateWaitHandle | Allocates a System.Threading.WaitHandle object. (Inherited from System.IO.Stream)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | ObjectInvariant | Provides support for a System.Diagnostics.Contracts.Contract. (Inherited from System.IO.Stream)
Top

See Also

Reference

BaseStream Class
Dart.Ssh Namespace


Close Method

[image]
PowerTCP SSH and SFTP for .NET
Close Method
See Also Send comments on this topic
Dart.Ssh Namespace > BaseStream Class : Close Method

Glossary Item Box

Calls InnerStream.Close.

Syntax

Visual Basic (Declaration)
Public Overrides Sub Close()
Visual Basic (Usage) Copy Code
Dim instance As BaseStream

instance.Close()
C#
public override void Close()
Managed Extensions for C++
public: void Close(); override
C++/CLI
public:
void Close(); override

See Also

Reference

BaseStream Class
BaseStream Members


Flush Method

[image]
PowerTCP SSH and SFTP for .NET
Flush Method
See Also Send comments on this topic
Dart.Ssh Namespace > BaseStream Class : Flush Method

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Overrides Sub Flush()
Visual Basic (Usage) Copy Code
Dim instance As BaseStream

instance.Flush()
C#
public override void Flush()
Managed Extensions for C++
public: void Flush(); override
C++/CLI
public:
void Flush(); override

See Also

Reference

BaseStream Class
BaseStream Members


Seek Method

[image]
PowerTCP SSH and SFTP for .NET
Seek Method
See Also Send comments on this topic
Dart.Ssh Namespace > BaseStream Class : Seek Method

offset
origin

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Overrides Function Seek( _
   ByVal offset As Long, _
   ByVal origin As SeekOrigin _
) As Long
Visual Basic (Usage) Copy Code
Dim instance As BaseStream
Dim offset As Long
Dim origin As SeekOrigin
Dim value As Long

value = instance.Seek(offset, origin)
C#
public override long Seek(
   long offset,
   SeekOrigin origin
)
Managed Extensions for C++
public: long Seek(
   long offset,
   SeekOrigin origin
) override
C++/CLI
public:
int64 Seek(
   int64 offset,
   SeekOrigin origin
) override

Parameters

offset
origin

See Also

Reference

BaseStream Class
BaseStream Members


SetLength Method

[image]
PowerTCP SSH and SFTP for .NET
SetLength Method
See Also Send comments on this topic
Dart.Ssh Namespace > BaseStream Class : SetLength Method

value

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Overrides Sub SetLength( _
   ByVal value As Long _
)
Visual Basic (Usage) Copy Code
Dim instance As BaseStream
Dim value As Long

instance.SetLength(value)
C#
public override void SetLength(
   long value
)
Managed Extensions for C++
public: void SetLength(
   long value
) override
C++/CLI
public:
void SetLength(
   int64 value
) override

Parameters

value

See Also

Reference

BaseStream Class
BaseStream Members


BaseStream Class Properties

[image]
PowerTCP SSH and SFTP for .NET
BaseStream Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : BaseStream Class

Glossary Item Box

For a list of all members of this type, see BaseStream members.

Public Properties

 | Name | Description
Public Property | CanRead | Overridden.
Public Property | CanSeek | Overridden.
Public Property | CanTimeout | Gets a value that determines whether the current stream can time out. (Inherited from System.IO.Stream)
Public Property | CanWrite | Overridden.
Public Property | Length | Overridden.
Public Property | Position | Overridden.
Public Property | ReadTimeout | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out. (Inherited from System.IO.Stream)
Public Property | WriteTimeout | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out. (Inherited from System.IO.Stream)
Top

See Also

Reference

BaseStream Class
Dart.Ssh Namespace


CanRead Property

[image]
PowerTCP SSH and SFTP for .NET
CanRead Property
See Also Send comments on this topic
Dart.Ssh Namespace > BaseStream Class : CanRead Property

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property CanRead As Boolean
Visual Basic (Usage) Copy Code
Dim instance As BaseStream
Dim value As Boolean

value = instance.CanRead
C#
public override bool CanRead {get;}
Managed Extensions for C++
public: __property bool get_CanRead() override;
C++/CLI
public:
property bool CanRead {
   bool get() override;
}

See Also

Reference

BaseStream Class
BaseStream Members


CanSeek Property

[image]
PowerTCP SSH and SFTP for .NET
CanSeek Property
See Also Send comments on this topic
Dart.Ssh Namespace > BaseStream Class : CanSeek Property

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property CanSeek As Boolean
Visual Basic (Usage) Copy Code
Dim instance As BaseStream
Dim value As Boolean

value = instance.CanSeek
C#
public override bool CanSeek {get;}
Managed Extensions for C++
public: __property bool get_CanSeek() override;
C++/CLI
public:
property bool CanSeek {
   bool get() override;
}

See Also

Reference

BaseStream Class
BaseStream Members


CanWrite Property

[image]
PowerTCP SSH and SFTP for .NET
CanWrite Property
See Also Send comments on this topic
Dart.Ssh Namespace > BaseStream Class : CanWrite Property

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property CanWrite As Boolean
Visual Basic (Usage) Copy Code
Dim instance As BaseStream
Dim value As Boolean

value = instance.CanWrite
C#
public override bool CanWrite {get;}
Managed Extensions for C++
public: __property bool get_CanWrite() override;
C++/CLI
public:
property bool CanWrite {
   bool get() override;
}

See Also

Reference

BaseStream Class
BaseStream Members


Length Property

[image]
PowerTCP SSH and SFTP for .NET
Length Property
See Also Send comments on this topic
Dart.Ssh Namespace > BaseStream Class : Length Property

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property Length As Long
Visual Basic (Usage) Copy Code
Dim instance As BaseStream
Dim value As Long

value = instance.Length
C#
public override long Length {get;}
Managed Extensions for C++
public: __property long get_Length() override;
C++/CLI
public:
property int64 Length {
   int64 get() override;
}

See Also

Reference

BaseStream Class
BaseStream Members


Position Property

[image]
PowerTCP SSH and SFTP for .NET
Position Property
See Also Send comments on this topic
Dart.Ssh Namespace > BaseStream Class : Position Property

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Overrides Property Position As Long
Visual Basic (Usage) Copy Code
Dim instance As BaseStream
Dim value As Long

instance.Position = value

value = instance.Position
C#
public override long Position {get; set;}
Managed Extensions for C++
public: __property long get_Position() override;
public: __property void set_Position(
   long value
) override;
C++/CLI
public:
property int64 Position {
   int64 get() override;
   void set (    int64 value) override;
}

See Also

Reference

BaseStream Class
BaseStream Members


ChallengeEventArgs Class

[image]
PowerTCP SSH and SFTP for .NET
ChallengeEventArgs Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : ChallengeEventArgs Class

Glossary Item Box

Provides data for the SshConnection.Challenge event.

Object Model

ChallengeEventArgs Class

Syntax

Visual Basic (Declaration)
Public Class ChallengeEventArgs
   Inherits System.EventArgs
Visual Basic (Usage) Copy Code
Dim instance As ChallengeEventArgs
C#
public class ChallengeEventArgs : System.EventArgs
Managed Extensions for C++
public __gc class ChallengeEventArgs : public System.EventArgs
C++/CLI
public ref class ChallengeEventArgs : public System.EventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
Dart.Ssh.ChallengeEventArgs

See Also

Reference

ChallengeEventArgs Members
Dart.Ssh Namespace


ChallengeEventArgs Class Members

[image]
PowerTCP SSH and SFTP for .NET
ChallengeEventArgs Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : ChallengeEventArgs Class

Glossary Item Box

The following tables list the members exposed by ChallengeEventArgs.

Public Properties

 | Name | Description
Public Property | Echo | Gets information sent by the server that indicates whether responses will be echoed back to the client.
Public Property | Instruction | Gets the instruction string sent by the server.
Public Property | Name | Gets the name string sent by the server.
Public Property | Prompt | Gets the prompt or prompts sent by the server.
Public Property | Response | Gets a string array that the user should initialize to values that will be sent to the server for authentication. Each Response correlates to a Prompt at the same index.
Top

See Also

Reference

ChallengeEventArgs Class
Dart.Ssh Namespace


ChallengeEventArgs Class Properties

[image]
PowerTCP SSH and SFTP for .NET
ChallengeEventArgs Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : ChallengeEventArgs Class

Glossary Item Box

For a list of all members of this type, see ChallengeEventArgs members.

Public Properties

 | Name | Description
Public Property | Echo | Gets information sent by the server that indicates whether responses will be echoed back to the client.
Public Property | Instruction | Gets the instruction string sent by the server.
Public Property | Name | Gets the name string sent by the server.
Public Property | Prompt | Gets the prompt or prompts sent by the server.
Public Property | Response | Gets a string array that the user should initialize to values that will be sent to the server for authentication. Each Response correlates to a Prompt at the same index.
Top

See Also

Reference

ChallengeEventArgs Class
Dart.Ssh Namespace


Echo Property

[image]
PowerTCP SSH and SFTP for .NET
Echo Property
See Also Send comments on this topic
Dart.Ssh Namespace > ChallengeEventArgs Class : Echo Property

Glossary Item Box

Gets information sent by the server that indicates whether responses will be echoed back to the client.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Echo As Boolean()
Visual Basic (Usage) Copy Code
Dim instance As ChallengeEventArgs
Dim value() As Boolean

value = instance.Echo
C#
public bool[] Echo {get;}
Managed Extensions for C++
public: __property bool[]* get_Echo();
C++/CLI
public:
property array<bool>^ Echo {
   array<bool>^ get();
}

See Also

Reference

ChallengeEventArgs Class
ChallengeEventArgs Members


Instruction Property

[image]
PowerTCP SSH and SFTP for .NET
Instruction Property
See Also Send comments on this topic
Dart.Ssh Namespace > ChallengeEventArgs Class : Instruction Property

Glossary Item Box

Gets the instruction string sent by the server.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Instruction As String
Visual Basic (Usage) Copy Code
Dim instance As ChallengeEventArgs
Dim value As String

value = instance.Instruction
C#
public string Instruction {get;}
Managed Extensions for C++
public: __property string* get_Instruction();
C++/CLI
public:
property String^ Instruction {
   String^ get();
}

See Also

Reference

ChallengeEventArgs Class
ChallengeEventArgs Members


Name Property

[image]
PowerTCP SSH and SFTP for .NET
Name Property
See Also Send comments on this topic
Dart.Ssh Namespace > ChallengeEventArgs Class : Name Property

Glossary Item Box

Gets the name string sent by the server.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Name As String
Visual Basic (Usage) Copy Code
Dim instance As ChallengeEventArgs
Dim value As String

value = instance.Name
C#
public string Name {get;}
Managed Extensions for C++
public: __property string* get_Name();
C++/CLI
public:
property String^ Name {
   String^ get();
}

See Also

Reference

ChallengeEventArgs Class
ChallengeEventArgs Members


Prompt Property

[image]
PowerTCP SSH and SFTP for .NET
Prompt Property
See Also Send comments on this topic
Dart.Ssh Namespace > ChallengeEventArgs Class : Prompt Property

Glossary Item Box

Gets the prompt or prompts sent by the server.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Prompt As String()
Visual Basic (Usage) Copy Code
Dim instance As ChallengeEventArgs
Dim value() As String

value = instance.Prompt
C#
public string[] Prompt {get;}
Managed Extensions for C++
public: __property string*[]* get_Prompt();
C++/CLI
public:
property array<String^>^ Prompt {
   array<String^>^ get();
}

See Also

Reference

ChallengeEventArgs Class
ChallengeEventArgs Members


Response Property

[image]
PowerTCP SSH and SFTP for .NET
Response Property
See Also Send comments on this topic
Dart.Ssh Namespace > ChallengeEventArgs Class : Response Property

Glossary Item Box

Gets a string array that the user should initialize to values that will be sent to the server for authentication. Each Response correlates to a Prompt at the same index.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Response As String()
Visual Basic (Usage) Copy Code
Dim instance As ChallengeEventArgs
Dim value() As String

value = instance.Response
C#
public string[] Response {get;}
Managed Extensions for C++
public: __property string*[]* get_Response();
C++/CLI
public:
property array<String^>^ Response {
   array<String^>^ get();
}

See Also

Reference

ChallengeEventArgs Class
ChallengeEventArgs Members


ChannelPacket Class

[image]
PowerTCP SSH and SFTP for .NET
ChannelPacket Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : ChannelPacket Class

Glossary Item Box

Class used to interpret the contents of a SSH_MSG_CHANNEL_DATA packet.

Object Model

ChannelPacket Class

Syntax

Visual Basic (Declaration)
Public Class ChannelPacket
   Inherits Packet
Visual Basic (Usage) Copy Code
Dim instance As ChannelPacket
C#
public class ChannelPacket : Packet
Managed Extensions for C++
public __gc class ChannelPacket : public Packet
C++/CLI
public ref class ChannelPacket : public Packet

Inheritance Hierarchy

System.Object
Dart.Ssh.Packet
Dart.Ssh.ChannelPacket
Dart.Ssh.SftpPacket

See Also

Reference

ChannelPacket Members
Dart.Ssh Namespace


ChannelPacket Class Members

[image]
PowerTCP SSH and SFTP for .NET
ChannelPacket Class Members
See Also Fields Properties Methods Send comments on this topic
Dart.Ssh Namespace : ChannelPacket Class

Glossary Item Box

The following tables list the members exposed by ChannelPacket.

Public Fields

 | Name | Description
Public Field | Content | The bytes sent or received. (Inherited from Dart.Ssh.Packet)
Top

Public Properties

 | Name | Description
Public Property | ChannelId | Channel identification.
Public Property | Message | The transport-level SSH-2 message type. (Inherited from Dart.Ssh.Packet)
Top

Public Methods

 | Name | Description
Public Method | ToString | Returns a formatted string suitable for viewing.
Top

See Also

Reference

ChannelPacket Class
Dart.Ssh Namespace


ChannelPacket Class Methods

[image]
PowerTCP SSH and SFTP for .NET
ChannelPacket Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : ChannelPacket Class

Glossary Item Box

For a list of all members of this type, see ChannelPacket members.

Public Methods

 | Name | Description
Public Method | ToString | Returns a formatted string suitable for viewing.
Top

See Also

Reference

ChannelPacket Class
Dart.Ssh Namespace


ToString Method

[image]
PowerTCP SSH and SFTP for .NET
ToString Method
See Also Send comments on this topic
Dart.Ssh Namespace > ChannelPacket Class : ToString Method

Glossary Item Box

Returns a formatted string suitable for viewing.

Syntax

Visual Basic (Declaration)
Public Overrides Function ToString() As String
Visual Basic (Usage) Copy Code
Dim instance As ChannelPacket
Dim value As String

value = instance.ToString()
C#
public override string ToString()
Managed Extensions for C++
public: string* ToString(); override
C++/CLI
public:
String^ ToString(); override

See Also

Reference

ChannelPacket Class
ChannelPacket Members


ChannelPacket Class Properties

[image]
PowerTCP SSH and SFTP for .NET
ChannelPacket Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : ChannelPacket Class

Glossary Item Box

For a list of all members of this type, see ChannelPacket members.

Public Properties

 | Name | Description
Public Property | ChannelId | Channel identification.
Public Property | Message | The transport-level SSH-2 message type. (Inherited from Dart.Ssh.Packet)
Top

See Also

Reference

ChannelPacket Class
Dart.Ssh Namespace


ChannelId Property

[image]
PowerTCP SSH and SFTP for .NET
ChannelId Property
See Also Send comments on this topic
Dart.Ssh Namespace > ChannelPacket Class : ChannelId Property

Glossary Item Box

Channel identification.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ChannelId As UInteger
Visual Basic (Usage) Copy Code
Dim instance As ChannelPacket
Dim value As UInteger

value = instance.ChannelId
C#
public uint ChannelId {get;}
Managed Extensions for C++
public: __property uint get_ChannelId();
C++/CLI
public:
property uint ChannelId {
   uint get();
}

See Also

Reference

ChannelPacket Class
ChannelPacket Members


ComponentBase Class

[image]
PowerTCP SSH and SFTP for .NET
ComponentBase Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : ComponentBase Class

Glossary Item Box

Base class for PowerTCP Components.

Object Model

ComponentBase Class

Syntax

Visual Basic (Declaration)
Public Class ComponentBase
   Inherits System.ComponentModel.Component
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
C#
public class ComponentBase : System.ComponentModel.Component
Managed Extensions for C++
public __gc class ComponentBase : public System.ComponentModel.Component
C++/CLI
public ref class ComponentBase : public System.ComponentModel.Component

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Dart.Ssh.ComponentBase
Dart.Ssh.SocketBase
Dart.Ssh.SshConnection

See Also

Reference

ComponentBase Members
Dart.Ssh Namespace


ComponentBase Class Members

[image]
PowerTCP SSH and SFTP for .NET
ComponentBase Class Members
See Also Properties Methods Events Send comments on this topic
Dart.Ssh Namespace : ComponentBase Class

Glossary Item Box

The following tables list the members exposed by ComponentBase.

Public Properties

 | Name | Description
Public Property | Container | (Inherited from System.ComponentModel.Component)
Public Property | Encoding | Character encoding used by the component.
Public Property | Site | (Inherited from System.ComponentModel.Component)
Public Property | SynchronizingObject | Gets or sets the object used to marshal data to the UI thread (for raising events).
Public Property | SyncRoot | Gets an object that is used to synchronize access to the upper layer protocol in use.
Public Property | Tag | Gets or sets an object that stores any user data.
Public Property | ThreadingModel | Controls the threading model used by the component.
Top

Protected Properties

 | Name | Description
Protected Property | CanRaiseEvents | (Inherited from System.ComponentModel.Component)
Protected Property | DesignMode | (Inherited from System.ComponentModel.Component)
Protected Property | Events | (Inherited from System.ComponentModel.Component)
Top

Public Methods

 | Name | Description
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Deserialize | Deserialize a previously serialized object.
Public Method | Dispose | Overloaded. (Inherited from System.ComponentModel.Component)
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Marshal | Overloaded. Marshals a string and/or object to the UI thread and raises the UserState event.
Public Method | Serialize | Serialize an object to the provided destination stream.
Public Method | ToString | (Inherited from System.ComponentModel.Component)
Top

Protected Methods

 | Name | Description
Protected Method | Finalize | (Inherited from System.ComponentModel.Component)
Protected Method | GetService | (Inherited from System.ComponentModel.Component)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | OnError | Raises the Error event.
Protected Method | OnUserState | Raises the UserState event.
Top

Public Events

 | Name | Description
Public Event | Disposed | (Inherited from System.ComponentModel.Component)
Public Event | Error | Raised when Marshal(Exception) is used or an unhandled Exception is thrown in a worker thread created using Start.
Public Event | UserState | Raised when Marshal(String,Object) is used.
Top

See Also

Reference

ComponentBase Class
Dart.Ssh Namespace


ComponentBase Class Methods

[image]
PowerTCP SSH and SFTP for .NET
ComponentBase Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : ComponentBase Class

Glossary Item Box

For a list of all members of this type, see ComponentBase members.

Public Methods

 | Name | Description
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Deserialize | Deserialize a previously serialized object.
Public Method | Dispose | Overloaded. (Inherited from System.ComponentModel.Component)
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Marshal | Overloaded. Marshals a string and/or object to the UI thread and raises the UserState event.
Public Method | Serialize | Serialize an object to the provided destination stream.
Public Method | ToString | (Inherited from System.ComponentModel.Component)
Top

Protected Methods

 | Name | Description
Protected Method | Finalize | (Inherited from System.ComponentModel.Component)
Protected Method | GetService | (Inherited from System.ComponentModel.Component)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | OnError | Raises the Error event.
Protected Method | OnUserState | Raises the UserState event.
Top

See Also

Reference

ComponentBase Class
Dart.Ssh Namespace


Deserialize Method

[image]
PowerTCP SSH and SFTP for .NET
Deserialize Method
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class : Deserialize Method

serializedObject
A stream containing the serialized data to deserialize.

Glossary Item Box

Deserialize a previously serialized object.

Syntax

Visual Basic (Declaration)
Public Function Deserialize( _
   ByVal serializedObject As Stream _
) As Object
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
Dim serializedObject As Stream
Dim value As Object

value = instance.Deserialize(serializedObject)
C#
public object Deserialize(
   Stream serializedObject
)
Managed Extensions for C++
public: Object* Deserialize(
   Stream* serializedObject
)
C++/CLI
public:
Object^ Deserialize(
   Stream^ serializedObject
)

Parameters

serializedObject
A stream containing the serialized data to deserialize.

Return Value

The deserialized object.

Remarks

Provides a simple mechanism for restoring a previously serialized state. For example, the state (all runtime parameters) of a Session object could be saved. The provided serializedObject is read from its current position.

See Also

Reference

ComponentBase Class
ComponentBase Members


Marshal Method

[image]
PowerTCP SSH and SFTP for .NET
Marshal Method
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class : Marshal Method

Glossary Item Box

Marshals a string and/or object to the UI thread and raises the UserState event.

Overload List

Overload | Description
Marshal(String,Object) | Marshals a string and/or object to the UI thread and raises the UserState event.
Marshal(Exception) | Marshals an exception to the UI thread and raises the Error event.

See Also

Reference

ComponentBase Class
ComponentBase Members


Marshal(String,Object) Method

[image]
PowerTCP SSH and SFTP for .NET
Marshal(String,Object) Method
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class > Marshal Method : Marshal(String,Object) Method

message
Message to pass into the UserState event.
state
Object to pass to the UserState event; can be null.

Glossary Item Box

Marshals a string and/or object to the UI thread and raises the UserState event.

Syntax

Visual Basic (Declaration)
Public Overloads Sub Marshal( _
   ByVal message As String, _
   ByVal state As Object _
)
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
Dim message As String
Dim state As Object

instance.Marshal(message, state)
C#
public void Marshal(
   string message,
   object state
)
Managed Extensions for C++
public: void Marshal(
   string* message,
   Object* state
)
C++/CLI
public:
void Marshal(
   String^ message,
   Object^ state
)

Parameters

message
Message to pass into the UserState event.
state
Object to pass to the UserState event; can be null.

Remarks

Used to marshal a string and/or object from a worker thread to the UI thread for typical display purposes. It calls OnUserState, which raises the UserState event.

See the SynchronizingObject property for information on updating UI controls in your event handler. Internally, SynchronizingObject.BeginInvoke is used to marshal data when the SynchronizingObject is not null, and Delegate.DynamicInvoke is used when SynchronizingObject is null. This method is provided for convenience; the developer may use alternative methods for marshaling data as required.

See Also

Reference

ComponentBase Class
ComponentBase Members
Overload List


Marshal(Exception) Method

[image]
PowerTCP SSH and SFTP for .NET
Marshal(Exception) Method
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class > Marshal Method : Marshal(Exception) Method

exception
The Exception to be marshaled.

Glossary Item Box

Marshals an exception to the UI thread and raises the Error event.

Syntax

Visual Basic (Declaration)
Public Overloads Sub Marshal( _
   ByVal exception As Exception _
)
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
Dim exception As Exception

instance.Marshal(exception)
C#
public void Marshal(
   Exception exception
)
Managed Extensions for C++
public: void Marshal(
   Exception* exception
)
C++/CLI
public:
void Marshal(
   Exception^ exception
)

Parameters

exception
The Exception to be marshaled.

Remarks

Used to marshal exceptions from a worker thread to the UI thread for typical display purposes. It calls OnError, which raises the Error event.

When Start is used, unhandled exceptions generated on worker threads are marshaled to the UI thread by this method.

See the SynchronizingObject property for information on updating UI controls in your event handler. Internally, SynchronizingObject.BeginInvoke is used to marshal data when the SynchronizingObject is not null, and Delegate.DynamicInvoke is used when SynchronizingObject is null. This method is provided for convenience; the developer may use alternative methods for marshaling data as required.

See Also

Reference

ComponentBase Class
ComponentBase Members
Overload List


OnError Method

[image]
PowerTCP SSH and SFTP for .NET
OnError Method
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class : OnError Method

e
A ErrorEventArgs object that contains the exception.

Glossary Item Box

Raises the Error event.

Syntax

Visual Basic (Declaration)
Protected Overridable Sub OnError( _
   ByVal e As ErrorEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
Dim e As ErrorEventArgs

instance.OnError(e)
C#
protected virtual void OnError(
   ErrorEventArgs e
)
Managed Extensions for C++
protected: virtual void OnError(
   ErrorEventArgs* e
)
C++/CLI
protected:
virtual void OnError(
   ErrorEventArgs^ e
)

Parameters

e
A ErrorEventArgs object that contains the exception.

Remarks

If the Synchronizing property is set, this method invokes Error asynchronously on the UI thread. If the Synchronizing property is null, this method invokes the Error event on the executing thread.

OnError allows derived classes to handle the Error event without attaching a delegate, but marshaling is not provided. This is the preferred technique for handling the event in a derived class.

Note to Inheritors: When overriding OnError in a derived class, be sure to call the base class OnError method, so that registered delegates receive the event.

See the SynchronizingObject property for information on updating UI controls in your event handler.

See Also

Reference

ComponentBase Class
ComponentBase Members


OnUserState Method

[image]
PowerTCP SSH and SFTP for .NET
OnUserState Method
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class : OnUserState Method

e
A UserStateEventArgs object that contains the user information.

Glossary Item Box

Raises the UserState event.

Syntax

Visual Basic (Declaration)
Protected Overridable Sub OnUserState( _
   ByVal e As UserStateEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
Dim e As UserStateEventArgs

instance.OnUserState(e)
C#
protected virtual void OnUserState(
   UserStateEventArgs e
)
Managed Extensions for C++
protected: virtual void OnUserState(
   UserStateEventArgs* e
)
C++/CLI
protected:
virtual void OnUserState(
   UserStateEventArgs^ e
)

Parameters

e
A UserStateEventArgs object that contains the user information.

Remarks

If the Synchronizing property is set, this method invokes UserState asynchronously on the UI thread. If the Synchronizing property is null, this method invokes UserState on the executing thread.

OnUserState allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class, but marshaling is not provided.

Note to Inheritors: When overriding OnUserState in a derived class, be sure to call the base class OnUserState method, so that registered delegates receive the event.

See the SynchronizingObject property for information on updating UI controls in your event handler.

See Also

Reference

ComponentBase Class
ComponentBase Members


Serialize Method

[image]
PowerTCP SSH and SFTP for .NET
Serialize Method
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class : Serialize Method

objectToSerialize
Object to serialize.
destination
Stream destination for the serialized data.

Glossary Item Box

Serialize an object to the provided destination stream.

Syntax

Visual Basic (Declaration)
Public Sub Serialize( _
   ByVal objectToSerialize As Object, _
   ByVal destination As Stream _
)
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
Dim objectToSerialize As Object
Dim destination As Stream

instance.Serialize(objectToSerialize, destination)
C#
public void Serialize(
   object objectToSerialize,
   Stream destination
)
Managed Extensions for C++
public: void Serialize(
   Object* objectToSerialize,
   Stream* destination
)
C++/CLI
public:
void Serialize(
   Object^ objectToSerialize,
   Stream^ destination
)

Parameters

objectToSerialize
Object to serialize.
destination
Stream destination for the serialized data.

Remarks

Can be used at runtime to persist the state of an object. For example, all runtime parameters of a Session object could be saved.

See Also

Reference

ComponentBase Class
ComponentBase Members


ComponentBase Class Properties

[image]
PowerTCP SSH and SFTP for .NET
ComponentBase Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : ComponentBase Class

Glossary Item Box

For a list of all members of this type, see ComponentBase members.

Public Properties

 | Name | Description
Public Property | Container | (Inherited from System.ComponentModel.Component)
Public Property | Encoding | Character encoding used by the component.
Public Property | Site | (Inherited from System.ComponentModel.Component)
Public Property | SynchronizingObject | Gets or sets the object used to marshal data to the UI thread (for raising events).
Public Property | SyncRoot | Gets an object that is used to synchronize access to the upper layer protocol in use.
Public Property | Tag | Gets or sets an object that stores any user data.
Public Property | ThreadingModel | Controls the threading model used by the component.
Top

Protected Properties

 | Name | Description
Protected Property | CanRaiseEvents | (Inherited from System.ComponentModel.Component)
Protected Property | DesignMode | (Inherited from System.ComponentModel.Component)
Protected Property | Events | (Inherited from System.ComponentModel.Component)
Top

See Also

Reference

ComponentBase Class
Dart.Ssh Namespace


Encoding Property

[image]
PowerTCP SSH and SFTP for .NET
Encoding Property
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class : Encoding Property

Glossary Item Box

Character encoding used by the component.

Syntax

Visual Basic (Declaration)
Public Overridable Property Encoding As Encoding
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
Dim value As Encoding

instance.Encoding = value

value = instance.Encoding
C#
public virtual Encoding Encoding {get; set;}
Managed Extensions for C++
public: __property virtual Encoding* get_Encoding();
public: __property virtual void set_Encoding(
   Encoding* value
);
C++/CLI
public:
virtual property Encoding^ Encoding {
   Encoding^ get();
   void set (    Encoding^ value);
}

See Also

Reference

ComponentBase Class
ComponentBase Members


SynchronizingObject Property

[image]
PowerTCP SSH and SFTP for .NET
SynchronizingObject Property
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class : SynchronizingObject Property

Glossary Item Box

Gets or sets the object used to marshal data to the UI thread (for raising events).

Syntax

Visual Basic (Declaration)
<DefaultValueAttribute()>
Public Property SynchronizingObject As ISynchronizeInvoke
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
Dim value As ISynchronizeInvoke

instance.SynchronizingObject = value

value = instance.SynchronizingObject
C#
[DefaultValue()]
public ISynchronizeInvoke SynchronizingObject {get; set;}
Managed Extensions for C++
[DefaultValue()]
public: __property ISynchronizeInvoke* get_SynchronizingObject();
public: __property void set_SynchronizingObject(
   ISynchronizeInvoke* value
);
C++/CLI
[DefaultValue()]
public:
property ISynchronizeInvoke^ SynchronizingObject {
   ISynchronizeInvoke^ get();
   void set (    ISynchronizeInvoke^ value);
}

Remarks

This property determines the thread on which the component's event handlers are raised. If set to a UI control, events are raised on the UI thread. If null, events are raised on the current thread.

This property is automatically set to the containing control when used in the Windows Forms designer. When a derived class is dynamically created this property must be set if marshaling to the UI thread is desired.

See Also

Reference

ComponentBase Class
ComponentBase Members


SyncRoot Property

[image]
PowerTCP SSH and SFTP for .NET
SyncRoot Property
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class : SyncRoot Property

Glossary Item Box

Gets an object that is used to synchronize access to the upper layer protocol in use.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property SyncRoot As Object
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
Dim value As Object

value = instance.SyncRoot
C#
public object SyncRoot {get;}
Managed Extensions for C++
public: __property Object* get_SyncRoot();
C++/CLI
public:
property Object^ SyncRoot {
   Object^ get();
}

Remarks

Upper layer protocols typically send a command and wait for it to complete. Use of this object in a C# "lock" statement can allow your code to wait until any ongoing command has completed.

See Also

Reference

ComponentBase Class
ComponentBase Members


Tag Property

[image]
PowerTCP SSH and SFTP for .NET
Tag Property
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class : Tag Property

Glossary Item Box

Gets or sets an object that stores any user data.

Syntax

Visual Basic (Declaration)
<DefaultValueAttribute()>
Public Property Tag As Object
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
Dim value As Object

instance.Tag = value

value = instance.Tag
C#
[DefaultValue()]
public object Tag {get; set;}
Managed Extensions for C++
[DefaultValue()]
public: __property Object* get_Tag();
public: __property void set_Tag(
   Object* value
);
C++/CLI
[DefaultValue()]
public:
property Object^ Tag {
   Object^ get();
   void set (    Object^ value);
}

See Also

Reference

ComponentBase Class
ComponentBase Members


ThreadingModel Property

[image]
PowerTCP SSH and SFTP for .NET
ThreadingModel Property
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class : ThreadingModel Property

Glossary Item Box

Controls the threading model used by the component.

Syntax

Visual Basic (Declaration)
<DefaultValueAttribute()>
Public Property ThreadingModel As ThreadingModel
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
Dim value As ThreadingModel

instance.ThreadingModel = value

value = instance.ThreadingModel
C#
[DefaultValue()]
public ThreadingModel ThreadingModel {get; set;}
Managed Extensions for C++
[DefaultValue()]
public: __property ThreadingModel get_ThreadingModel();
public: __property void set_ThreadingModel(
   ThreadingModel value
);
C++/CLI
[DefaultValue()]
public:
property ThreadingModel ThreadingModel {
   ThreadingModel get();
   void set (    ThreadingModel value);
}

Remarks

See ThreadingModel for a complete description of this property's use.

See Also

Reference

ComponentBase Class
ComponentBase Members


ComponentBase Class Events

[image]
PowerTCP SSH and SFTP for .NET
ComponentBase Class Events
See Also Send comments on this topic
Dart.Ssh Namespace : ComponentBase Class

Glossary Item Box

For a list of all members of this type, see ComponentBase members.

Public Events

 | Name | Description
Public Event | Disposed | (Inherited from System.ComponentModel.Component)
Public Event | Error | Raised when Marshal(Exception) is used or an unhandled Exception is thrown in a worker thread created using Start.
Public Event | UserState | Raised when Marshal(String,Object) is used.
Top

See Also

Reference

ComponentBase Class
Dart.Ssh Namespace


Error Event

[image]
PowerTCP SSH and SFTP for .NET
Error Event
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class : Error Event

Glossary Item Box

Raised when Marshal(Exception) is used or an unhandled Exception is thrown in a worker thread created using Start.

Syntax

Visual Basic (Declaration)
Public Event Error As ErrorEventHandler
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
Dim handler As ErrorEventHandler

AddHandler instance.Error, handler
C#
public event ErrorEventHandler Error
Managed Extensions for C++
public: __event ErrorEventHandler* Error
C++/CLI
public:
event ErrorEventHandler^ Error

Remarks

See the SynchronizingObject property for information on updating UI controls in your event handler.

See Also

Reference

ComponentBase Class
ComponentBase Members


UserState Event

[image]
PowerTCP SSH and SFTP for .NET
UserState Event
See Also Send comments on this topic
Dart.Ssh Namespace > ComponentBase Class : UserState Event

Glossary Item Box

Raised when Marshal(String,Object) is used.

Syntax

Visual Basic (Declaration)
Public Event UserState As UserStateEventHandler
Visual Basic (Usage) Copy Code
Dim instance As ComponentBase
Dim handler As UserStateEventHandler

AddHandler instance.UserState, handler
C#
public event UserStateEventHandler UserState
Managed Extensions for C++
public: __event UserStateEventHandler* UserState
C++/CLI
public:
event UserStateEventHandler^ UserState

Event Data

The event handler receives an argument of type UserStateEventArgs containing data related to this event. The following UserStateEventArgs properties provide information specific to this event.

Property | Description
Message | Returns the message argument provided by the Marshal method.
UserState | Returns the user state argument provided by the Marshal method.

Remarks

See the SynchronizingObject property for information on updating UI controls in your event handler.

See Also

Reference

ComponentBase Class
ComponentBase Members


Connection Class

[image]
PowerTCP SSH and SFTP for .NET
Connection Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : Connection Class

Glossary Item Box

Establishes an encrypted TCP/IP connection to an SSH-2 server.

Object Model

Connection ClassConnectionInfo ClassDHGexParameters ClassIPEndPoint ClassHttpProxyData ClassIPEndPoint Class

Syntax

Visual Basic (Declaration)
Public NotInheritable Class Connection
Visual Basic (Usage) Copy Code
Dim instance As Connection
C#
public sealed class Connection
Managed Extensions for C++
public __gc __sealed class Connection
C++/CLI
public ref class Connection sealed

Remarks

This class is created by the SshConnection class and is exposed for fine-grain control of the connection and authentication process.

Inheritance Hierarchy

System.Object
Dart.Ssh.Connection

See Also

Reference

Connection Members
Dart.Ssh Namespace


Connection Class Members

[image]
PowerTCP SSH and SFTP for .NET
Connection Class Members
See Also Fields Properties Methods Send comments on this topic
Dart.Ssh Namespace : Connection Class

Glossary Item Box

The following tables list the members exposed by Connection.

Public Fields

 | Name | Description
Public Field | Identification | The identifier presented to the SSH-2 server.
Top

Public Properties

 | Name | Description
Public Property | AuthenticationComplete | Indicates whether the authentication phase is complete.
Public Property | AuthenticationPartialSuccess | Returns true if there was at least one failed authentication request and the server marked the last failed authentication request "partial success".
static (Shared in Visual Basic) | AvailableCiphers | Returns a list of supported cipher algorithms.
static (Shared in Visual Basic) | AvailableKeyExchangeAlgorithms | Returns a list of supported key exchange algorithms.
static (Shared in Visual Basic) | AvailableMACs | Returns a list of supported MAC algorithms.
static (Shared in Visual Basic) | AvailableServerHostKeyAlgorithms | Returns a list of supported server host key algorithms.
Public Property | Client2ServerCiphers | Returns a list of ciphers available for the client-to-server direction, in order of preference.
Public Property | Client2ServerMACs | Returns a list of MACs available for the client-to-server direction, in order of preference.
Public Property | ConnectionInfo | Returns a ConnectionInfo object containing the details of the connection.
Public Property | DHGexParameters | Parameters used in the diffie-hellman group exchange.
Public Property | KeyExchangeAlgorithms | Returns a list of available key exchange algorithms, in order of preference.
Public Property | LocalEndPoint | EndPoint to bind to locally.
Public Property | NegotiateCompression | Enables compression negotiation.
Public Property | Proxy | The Proxy used when establishing the connection via proxy.
Public Property | RemoteEndPoint | EndPoint of the remote host to connect to.
Public Property | Server2ClientCiphers | Returns a list of ciphers available for the server-to-client direction, in order of preference.
Public Property | Server2ClientMACs | Returns a list of macs available for the server-to-client direction, in order of preference.
Public Property | ServerHostKeyAlgorithms | Returns a list of supported host key algorithms, in order of preference.
Public Property | TcpNoDelay | Enables TCP_NODELAY (Nagle's algorithm) on the underlying socket.
Top

Public Methods

 | Name | Description
Public Method | GetRemainingAuthMethods | Checks which authentication methods are supported by the server at the current stage of the authentication process.
Public Method | IsAuthMethodAvailable | Checks if the specified authentication method is available.
Public Method | OpenSession | Overloaded. Opens a new Session on this connection.
Top

See Also

Reference

Connection Class
Dart.Ssh Namespace


Connection Class Methods

[image]
PowerTCP SSH and SFTP for .NET
Connection Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : Connection Class

Glossary Item Box

For a list of all members of this type, see Connection members.

Public Methods

 | Name | Description
Public Method | GetRemainingAuthMethods | Checks which authentication methods are supported by the server at the current stage of the authentication process.
Public Method | IsAuthMethodAvailable | Checks if the specified authentication method is available.
Public Method | OpenSession | Overloaded. Opens a new Session on this connection.
Top

See Also

Reference

Connection Class
Dart.Ssh Namespace


GetRemainingAuthMethods(String) Method

[image]
PowerTCP SSH and SFTP for .NET
GetRemainingAuthMethods(String) Method
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : GetRemainingAuthMethods(String) Method

username
The username to use for authentication

Glossary Item Box

Checks which authentication methods are supported by the server at the current stage of the authentication process.

Syntax

Visual Basic (Declaration)
Public Function GetRemainingAuthMethods( _
   ByVal username As String _
) As String()
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim username As String
Dim value() As String

value = instance.GetRemainingAuthMethods(username)
C#
public string[] GetRemainingAuthMethods(
   string username
)
Managed Extensions for C++
public: string*[]* GetRemainingAuthMethods(
   string* username
)
C++/CLI
public:
array<String^>^ GetRemainingAuthMethods(
   String^ username
)

Parameters

username
The username to use for authentication

Return Value

An array holding authentication method names

Remarks

If authentication was not attempted prior to calling this method, this method will perform 'none' authentication with the specified username to query the available authentication methods, and will raise the StateChanged event before this methods returns. If authentication was previously attempted, the username argument is not used, and this method will return the cached value from the prior authentication attempt; the StateChanged event will not be raised.

If your server accepts 'none' authentication as the sole authentication factor, this method will authenticate the user.

The server may return method names that are not supported by this implementation.

This method should not be called after a successful authentication.

See Also

Reference

Connection Class
Connection Members


IsAuthMethodAvailable Method

[image]
PowerTCP SSH and SFTP for .NET
IsAuthMethodAvailable Method
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : IsAuthMethodAvailable Method

username
The username used for authentication
method
An authentication method (e.g., 'publickey', 'password', 'keyboard-interactive') as specified by the SSH-2 standard

Glossary Item Box

Checks if the specified authentication method is available.

Syntax

Visual Basic (Declaration)
Public Function IsAuthMethodAvailable( _
   ByVal username As String, _
   ByVal method As String _
) As Boolean
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim username As String
Dim method As String
Dim value As Boolean

value = instance.IsAuthMethodAvailable(username, method)
C#
public bool IsAuthMethodAvailable(
   string username,
   string method
)
Managed Extensions for C++
public: bool IsAuthMethodAvailable(
   string* username,
   string* method
)
C++/CLI
public:
bool IsAuthMethodAvailable(
   String^ username,
   String^ method
)

Parameters

username
The username used for authentication
method
An authentication method (e.g., 'publickey', 'password', 'keyboard-interactive') as specified by the SSH-2 standard

Return Value

True if the specified authentication method is currently available.

See Also

Reference

Connection Class
Connection Members
GetRemainingAuthMethods(String) Method


OpenSession Method

[image]
PowerTCP SSH and SFTP for .NET
OpenSession Method
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : OpenSession Method

Glossary Item Box

Opens a new Session on this connection.

Overload List

Overload | Description
OpenSession() | Opens a new Session on this connection.
OpenSession(Int32) | Opens a new Session on this connection.

See Also

Reference

Connection Class
Connection Members


OpenSession() Method

[image]
PowerTCP SSH and SFTP for .NET
OpenSession() Method
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class > OpenSession Method : OpenSession() Method

Glossary Item Box

Opens a new Session on this connection.

Syntax

Visual Basic (Declaration)
Public Overloads Function OpenSession() As Session
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value As Session

value = instance.OpenSession()
C#
public Session OpenSession()
Managed Extensions for C++
public: Session* OpenSession();
C++/CLI
public:
Session^ OpenSession();

Return Value

A Session object.

Exceptions

Exception | Description
System.InvalidOperationException | Thrown when the underlying connection is closed or not authenticated.

Remarks

Works only after a successful authentication. No limit is imposed on the number of concurrent sessions (however, some SSH servers may enforce a limit). An initial window size of 30KB is sent to the server.

See Also

Reference

Connection Class
Connection Members
Overload List


OpenSession(Int32) Method

[image]
PowerTCP SSH and SFTP for .NET
OpenSession(Int32) Method
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class > OpenSession Method : OpenSession(Int32) Method

windowSize
The intial window size to send to the server.

Glossary Item Box

Opens a new Session on this connection.

Syntax

Visual Basic (Declaration)
Public Overloads Function OpenSession( _
   ByVal windowSize As Integer _
) As Session
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim windowSize As Integer
Dim value As Session

value = instance.OpenSession(windowSize)
C#
public Session OpenSession(
   int windowSize
)
Managed Extensions for C++
public: Session* OpenSession(
   int windowSize
)
C++/CLI
public:
Session^ OpenSession(
   int windowSize
)

Parameters

windowSize
The intial window size to send to the server.

Return Value

A Session object.

Exceptions

Exception | Description
System.InvalidOperationException | Thrown when the underlying connection is closed or not authenticated.

Remarks

Works only after a successful authentication. No limit is imposed on the number of concurrent sessions (however, some SSH servers may enforce a limit).

See Also

Reference

Connection Class
Connection Members
Overload List


Connection Class Properties

[image]
PowerTCP SSH and SFTP for .NET
Connection Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : Connection Class

Glossary Item Box

For a list of all members of this type, see Connection members.

Public Properties

 | Name | Description
Public Property | AuthenticationComplete | Indicates whether the authentication phase is complete.
Public Property | AuthenticationPartialSuccess | Returns true if there was at least one failed authentication request and the server marked the last failed authentication request "partial success".
static (Shared in Visual Basic) | AvailableCiphers | Returns a list of supported cipher algorithms.
static (Shared in Visual Basic) | AvailableKeyExchangeAlgorithms | Returns a list of supported key exchange algorithms.
static (Shared in Visual Basic) | AvailableMACs | Returns a list of supported MAC algorithms.
static (Shared in Visual Basic) | AvailableServerHostKeyAlgorithms | Returns a list of supported server host key algorithms.
Public Property | Client2ServerCiphers | Returns a list of ciphers available for the client-to-server direction, in order of preference.
Public Property | Client2ServerMACs | Returns a list of MACs available for the client-to-server direction, in order of preference.
Public Property | ConnectionInfo | Returns a ConnectionInfo object containing the details of the connection.
Public Property | DHGexParameters | Parameters used in the diffie-hellman group exchange.
Public Property | KeyExchangeAlgorithms | Returns a list of available key exchange algorithms, in order of preference.
Public Property | LocalEndPoint | EndPoint to bind to locally.
Public Property | NegotiateCompression | Enables compression negotiation.
Public Property | Proxy | The Proxy used when establishing the connection via proxy.
Public Property | RemoteEndPoint | EndPoint of the remote host to connect to.
Public Property | Server2ClientCiphers | Returns a list of ciphers available for the server-to-client direction, in order of preference.
Public Property | Server2ClientMACs | Returns a list of macs available for the server-to-client direction, in order of preference.
Public Property | ServerHostKeyAlgorithms | Returns a list of supported host key algorithms, in order of preference.
Public Property | TcpNoDelay | Enables TCP_NODELAY (Nagle's algorithm) on the underlying socket.
Top

See Also

Reference

Connection Class
Dart.Ssh Namespace


AuthenticationComplete Property

[image]
PowerTCP SSH and SFTP for .NET
AuthenticationComplete Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : AuthenticationComplete Property

Glossary Item Box

Indicates whether the authentication phase is complete.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property AuthenticationComplete As Boolean
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value As Boolean

value = instance.AuthenticationComplete
C#
public bool AuthenticationComplete {get;}
Managed Extensions for C++
public: __property bool get_AuthenticationComplete();
C++/CLI
public:
property bool AuthenticationComplete {
   bool get();
}

Property Value

True if no further authentication steps are needed.

See Also

Reference

Connection Class
Connection Members


AuthenticationPartialSuccess Property

[image]
PowerTCP SSH and SFTP for .NET
AuthenticationPartialSuccess Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : AuthenticationPartialSuccess Property

Glossary Item Box

Returns true if there was at least one failed authentication request and the server marked the last failed authentication request "partial success".

Syntax

Visual Basic (Declaration)
Public ReadOnly Property AuthenticationPartialSuccess As Boolean
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value As Boolean

value = instance.AuthenticationPartialSuccess
C#
public bool AuthenticationPartialSuccess {get;}
Managed Extensions for C++
public: __property bool get_AuthenticationPartialSuccess();
C++/CLI
public:
property bool AuthenticationPartialSuccess {
   bool get();
}

Property Value

True if the server returned a "partial success" code for the prior authentication attempt.

Remarks

This is only needed for SSH-2 server setups that require multi-factor authentication (multiple authentication steps are needed).

See RFC 4252 for more details.

See Also

Reference

Connection Class
Connection Members


AvailableCiphers Property

[image]
PowerTCP SSH and SFTP for .NET
AvailableCiphers Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : AvailableCiphers Property

Glossary Item Box

Returns a list of supported cipher algorithms.

Syntax

Visual Basic (Declaration)
<ObsoleteAttribute("Use Client2ServerCiphers and/or Server2ClientCiphers instead")>
Public Shared ReadOnly Property AvailableCiphers As String()
Visual Basic (Usage) Copy Code
Dim value() As String

value = Connection.AvailableCiphers
C#
[Obsolete("Use Client2ServerCiphers and/or Server2ClientCiphers instead")]
public static string[] AvailableCiphers {get;}
Managed Extensions for C++
[Obsolete("Use Client2ServerCiphers and/or Server2ClientCiphers instead")]
public: __property static string*[]* get_AvailableCiphers();
C++/CLI
[Obsolete("Use Client2ServerCiphers and/or Server2ClientCiphers instead")]
public:
static property array<String^>^ AvailableCiphers {
   array<String^>^ get();
}

See Also

Reference

Connection Class
Connection Members


AvailableKeyExchangeAlgorithms Property

[image]
PowerTCP SSH and SFTP for .NET
AvailableKeyExchangeAlgorithms Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : AvailableKeyExchangeAlgorithms Property

Glossary Item Box

Returns a list of supported key exchange algorithms.

Syntax

Visual Basic (Declaration)
<ObsoleteAttribute("Use KeyExchangeAlgorithms instead")>
Public Shared ReadOnly Property AvailableKeyExchangeAlgorithms As String()
Visual Basic (Usage) Copy Code
Dim value() As String

value = Connection.AvailableKeyExchangeAlgorithms
C#
[Obsolete("Use KeyExchangeAlgorithms instead")]
public static string[] AvailableKeyExchangeAlgorithms {get;}
Managed Extensions for C++
[Obsolete("Use KeyExchangeAlgorithms instead")]
public: __property static string*[]* get_AvailableKeyExchangeAlgorithms();
C++/CLI
[Obsolete("Use KeyExchangeAlgorithms instead")]
public:
static property array<String^>^ AvailableKeyExchangeAlgorithms {
   array<String^>^ get();
}

See Also

Reference

Connection Class
Connection Members


AvailableMACs Property

[image]
PowerTCP SSH and SFTP for .NET
AvailableMACs Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : AvailableMACs Property

Glossary Item Box

Returns a list of supported MAC algorithms.

Syntax

Visual Basic (Declaration)
<ObsoleteAttribute("Use Client2ServerMACs and/or Server2ClientMACs instead")>
Public Shared ReadOnly Property AvailableMACs As String()
Visual Basic (Usage) Copy Code
Dim value() As String

value = Connection.AvailableMACs
C#
[Obsolete("Use Client2ServerMACs and/or Server2ClientMACs instead")]
public static string[] AvailableMACs {get;}
Managed Extensions for C++
[Obsolete("Use Client2ServerMACs and/or Server2ClientMACs instead")]
public: __property static string*[]* get_AvailableMACs();
C++/CLI
[Obsolete("Use Client2ServerMACs and/or Server2ClientMACs instead")]
public:
static property array<String^>^ AvailableMACs {
   array<String^>^ get();
}

See Also

Reference

Connection Class
Connection Members


AvailableServerHostKeyAlgorithms Property

[image]
PowerTCP SSH and SFTP for .NET
AvailableServerHostKeyAlgorithms Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : AvailableServerHostKeyAlgorithms Property

Glossary Item Box

Returns a list of supported server host key algorithms.

Syntax

Visual Basic (Declaration)
<ObsoleteAttribute("Use ServerHostKeyAlgorithms instead")>
Public Shared ReadOnly Property AvailableServerHostKeyAlgorithms As String()
Visual Basic (Usage) Copy Code
Dim value() As String

value = Connection.AvailableServerHostKeyAlgorithms
C#
[Obsolete("Use ServerHostKeyAlgorithms instead")]
public static string[] AvailableServerHostKeyAlgorithms {get;}
Managed Extensions for C++
[Obsolete("Use ServerHostKeyAlgorithms instead")]
public: __property static string*[]* get_AvailableServerHostKeyAlgorithms();
C++/CLI
[Obsolete("Use ServerHostKeyAlgorithms instead")]
public:
static property array<String^>^ AvailableServerHostKeyAlgorithms {
   array<String^>^ get();
}

See Also

Reference

Connection Class
Connection Members


Client2ServerCiphers Property

[image]
PowerTCP SSH and SFTP for .NET
Client2ServerCiphers Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : Client2ServerCiphers Property

Glossary Item Box

Returns a list of ciphers available for the client-to-server direction, in order of preference.

Syntax

Visual Basic (Declaration)
Public Property Client2ServerCiphers As String()
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value() As String

instance.Client2ServerCiphers = value

value = instance.Client2ServerCiphers
C#
public string[] Client2ServerCiphers {get; set;}
Managed Extensions for C++
public: __property string*[]* get_Client2ServerCiphers();
public: __property void set_Client2ServerCiphers(
   string*[]* value
);
C++/CLI
public:
property array<String^>^ Client2ServerCiphers {
   array<String^>^ get();
   void set (    array<String^>^ value);
}

Remarks

By default, the array contains the following strings:

  • aes128-cbc
  • 3des-cbc
  • aes192-cbc
  • aes256-cbc
  • aes128-ctr
  • 3des-ctr
  • aes192-ctr
  • aes256-ctr

This array can be modified to remove unwanted ciphers, or to re-order the list for preference.

The algorithms specified in this array will be backed by the corresponding System.Security.Cryptography classes available under the project's target .NET Framework (up to and including .NET 4.6.2) and runtime OS in the following order of preference: *Cng, *CryptoServiceProvider, *Managed. AesCng and TripleDesCng will not be utilized under Windows 7, as despite that they are available under .NET 4.6.2 on Windows 7, their implementation under Windows 7 does not include support for symmetric keys, which is required. Only algorithms backed by a System.Security.Cryptography class available under the project's target .NET Framework and runtime OS will be added to this array when the component is created.

Note on FIPS compliance: If the system security policy dictates that only FIPS-certified algorithms may be used, only algorithms backed by FIPS-certified System.Security.Cryptography classes available under the project's target .NET Framework and runtime OS will be added to this array when the component is created. If non-certified algorithms are added to the collection, they will be removed prior to establishing a connection.

See Also

Reference

Connection Class
Connection Members


Client2ServerMACs Property

[image]
PowerTCP SSH and SFTP for .NET
Client2ServerMACs Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : Client2ServerMACs Property

Glossary Item Box

Returns a list of MACs available for the client-to-server direction, in order of preference.

Syntax

Visual Basic (Declaration)
Public Property Client2ServerMACs As String()
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value() As String

instance.Client2ServerMACs = value

value = instance.Client2ServerMACs
C#
public string[] Client2ServerMACs {get; set;}
Managed Extensions for C++
public: __property string*[]* get_Client2ServerMACs();
public: __property void set_Client2ServerMACs(
   string*[]* value
);
C++/CLI
public:
property array<String^>^ Client2ServerMACs {
   array<String^>^ get();
   void set (    array<String^>^ value);
}

Remarks

By default, the array contains the following strings:

  • hmac-sha2-512
  • hmac-sha2-256
  • hmac-sha1
  • hmac-sha1-96
  • hmac-md5
  • hmac-md5-96

This array can be modified to remove unwanted MACs, or to re-order the list for preference.

The algorithms specified in this array will be backed by the corresponding System.Security.Cryptography classes available under the project's target .NET Framework (up to and including .NET 4.6.2) and runtime OS in the following order of preference: *Cng, *CryptoServiceProvider, *Managed. Only algorithms backed by a System.Security.Cryptography class available under the project's target .NET Framework and runtime OS will be added to this array when the component is created.

Note on FIPS compliance: If the system security policy dictates that only FIPS-certified algorithms may be used, only algorithms backed by FIPS-certified System.Security.Cryptography classes available under the project's target .NET Framework and runtime OS will be added to this array when the component is created. If non-certified algorithms are added to the collection, they will be removed prior to establishing a connection.

See Also

Reference

Connection Class
Connection Members


ConnectionInfo Property

[image]
PowerTCP SSH and SFTP for .NET
ConnectionInfo Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : ConnectionInfo Property

Glossary Item Box

Returns a ConnectionInfo object containing the details of the connection.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ConnectionInfo As ConnectionInfo
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value As ConnectionInfo

value = instance.ConnectionInfo
C#
public ConnectionInfo ConnectionInfo {get;}
Managed Extensions for C++
public: __property ConnectionInfo* get_ConnectionInfo();
C++/CLI
public:
property ConnectionInfo^ ConnectionInfo {
   ConnectionInfo^ get();
}

Exceptions

Exception | Description
System.InvalidOperationException | Thrown if no connection exists.

Remarks

Can be called as soon as the connection has been successfully established.

See Also

Reference

Connection Class
Connection Members


DHGexParameters Property

[image]
PowerTCP SSH and SFTP for .NET
DHGexParameters Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : DHGexParameters Property

Glossary Item Box

Parameters used in the diffie-hellman group exchange.

Syntax

Visual Basic (Declaration)
Public Property DHGexParameters As DHGexParameters
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value As DHGexParameters

instance.DHGexParameters = value

value = instance.DHGexParameters
C#
public DHGexParameters DHGexParameters {get; set;}
Managed Extensions for C++
public: __property DHGexParameters* get_DHGexParameters();
public: __property void set_DHGexParameters(
   DHGexParameters* value
);
C++/CLI
public:
property DHGexParameters^ DHGexParameters {
   DHGexParameters^ get();
   void set (    DHGexParameters^ value);
}

Remarks

Default values are defined in the DHGexParameters class.

See Also

Reference

Connection Class
Connection Members


KeyExchangeAlgorithms Property

[image]
PowerTCP SSH and SFTP for .NET
KeyExchangeAlgorithms Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : KeyExchangeAlgorithms Property

Glossary Item Box

Returns a list of available key exchange algorithms, in order of preference.

Syntax

Visual Basic (Declaration)
Public Property KeyExchangeAlgorithms As String()
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value() As String

instance.KeyExchangeAlgorithms = value

value = instance.KeyExchangeAlgorithms
C#
public string[] KeyExchangeAlgorithms {get; set;}
Managed Extensions for C++
public: __property string*[]* get_KeyExchangeAlgorithms();
public: __property void set_KeyExchangeAlgorithms(
   string*[]* value
);
C++/CLI
public:
property array<String^>^ KeyExchangeAlgorithms {
   array<String^>^ get();
   void set (    array<String^>^ value);
}

Property Value

An array of available key exchange algorithms.

Remarks

By default, the array contains the following strings:

  • diffie-hellman-group-exchange-sha256
  • diffie-hellman-group-exchange-sha1
  • diffie-hellman-group14-sha1
  • diffie-hellman-group1-sha1

The algorithms specified in this array will be backed by the corresponding System.Security.Cryptography classes available under the project's target .NET Framework (up to and including .NET 4.6.2) and runtime OS in the following order of preference: *Cng, *CryptoServiceProvider, *Managed. Only algorithms backed by a System.Security.Cryptography class available under the project's target .NET Framework and runtime OS will be added to this array when the component is created.

Note on FIPS compliance: If the system security policy dictates that only FIPS-certified algorithms may be used, only algorithms backed by FIPS-certified System.Security.Cryptography classes available under the project's target .NET Framework and runtime OS will be added to this array when the component is created. If non-certified algorithms are added to the collection, they will be removed prior to establishing a connection.

See Also

Reference

Connection Class
Connection Members


LocalEndPoint Property

[image]
PowerTCP SSH and SFTP for .NET
LocalEndPoint Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : LocalEndPoint Property

Glossary Item Box

EndPoint to bind to locally.

Syntax

Visual Basic (Declaration)
<DefaultValueAttribute()>
Public Property LocalEndPoint As IPEndPoint
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value As IPEndPoint

instance.LocalEndPoint = value

value = instance.LocalEndPoint
C#
[DefaultValue()]
public IPEndPoint LocalEndPoint {get; set;}
Managed Extensions for C++
[DefaultValue()]
public: __property IPEndPoint* get_LocalEndPoint();
public: __property void set_LocalEndPoint(
   IPEndPoint* value
);
C++/CLI
[DefaultValue()]
public:
property IPEndPoint^ LocalEndPoint {
   IPEndPoint^ get();
   void set (    IPEndPoint^ value);
}

See Also

Reference

Connection Class
Connection Members


NegotiateCompression Property

[image]
PowerTCP SSH and SFTP for .NET
NegotiateCompression Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : NegotiateCompression Property

Glossary Item Box

Enables compression negotiation.

Syntax

Visual Basic (Declaration)
Public Property NegotiateCompression As Boolean
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value As Boolean

instance.NegotiateCompression = value

value = instance.NegotiateCompression
C#
public bool NegotiateCompression {get; set;}
Managed Extensions for C++
public: __property bool get_NegotiateCompression();
public: __property void set_NegotiateCompression(
   bool value
);
C++/CLI
public:
property bool NegotiateCompression {
   bool get();
   void set (    bool value);
}

Property Value

True to enable compression negotiation.

Remarks

Negotiates compression when true, advertises only the 'none' compression method when false.

Note: Setting this property to true does not guarantee the use of compression, only that its use will be negotiated. Additionally, compression is negotiated in a bi-directional manner, so it is possible that compression is enabled only for client-to-server communications, but not for server-to-client, or vice-versa (this property enables/disables client negotiation for both).

Supported compression methods are:

  • zlib@openssh.com
  • zlib
  • none

See Also

Reference

Connection Class
Connection Members


Proxy Property

[image]
PowerTCP SSH and SFTP for .NET
Proxy Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : Proxy Property

Glossary Item Box

The Proxy used when establishing the connection via proxy.

Syntax

Visual Basic (Declaration)
Public Property Proxy As HttpProxyData
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value As HttpProxyData

instance.Proxy = value

value = instance.Proxy
C#
public HttpProxyData Proxy {get; set;}
Managed Extensions for C++
public: __property HttpProxyData* get_Proxy();
public: __property void set_Proxy(
   HttpProxyData* value
);
C++/CLI
public:
property HttpProxyData^ Proxy {
   HttpProxyData^ get();
   void set (    HttpProxyData^ value);
}

Property Value

Default to null (no proxy).

Remarks

Only HTTP proxies are supported at this time.

See Also

Reference

Connection Class
Connection Members
HttpProxyData Class


RemoteEndPoint Property

[image]
PowerTCP SSH and SFTP for .NET
RemoteEndPoint Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : RemoteEndPoint Property

Glossary Item Box

EndPoint of the remote host to connect to.

Syntax

Visual Basic (Declaration)
<DefaultValueAttribute()>
Public Property RemoteEndPoint As IPEndPoint
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value As IPEndPoint

instance.RemoteEndPoint = value

value = instance.RemoteEndPoint
C#
[DefaultValue()]
public IPEndPoint RemoteEndPoint {get; set;}
Managed Extensions for C++
[DefaultValue()]
public: __property IPEndPoint* get_RemoteEndPoint();
public: __property void set_RemoteEndPoint(
   IPEndPoint* value
);
C++/CLI
[DefaultValue()]
public:
property IPEndPoint^ RemoteEndPoint {
   IPEndPoint^ get();
   void set (    IPEndPoint^ value);
}

See Also

Reference

Connection Class
Connection Members


Server2ClientCiphers Property

[image]
PowerTCP SSH and SFTP for .NET
Server2ClientCiphers Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : Server2ClientCiphers Property

Glossary Item Box

Returns a list of ciphers available for the server-to-client direction, in order of preference.

Syntax

Visual Basic (Declaration)
Public Property Server2ClientCiphers As String()
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value() As String

instance.Server2ClientCiphers = value

value = instance.Server2ClientCiphers
C#
public string[] Server2ClientCiphers {get; set;}
Managed Extensions for C++
public: __property string*[]* get_Server2ClientCiphers();
public: __property void set_Server2ClientCiphers(
   string*[]* value
);
C++/CLI
public:
property array<String^>^ Server2ClientCiphers {
   array<String^>^ get();
   void set (    array<String^>^ value);
}

Remarks

By default, the array contains the following strings:

  • aes128-cbc
  • 3des-cbc
  • aes192-cbc
  • aes256-cbc
  • aes128-ctr
  • 3des-ctr
  • aes192-ctr
  • aes256-ctr

This array can be modified to remove unwanted ciphers, or to re-order the list for preference.

The algorithms specified in this array will be backed by the corresponding System.Security.Cryptography classes available under the project's target .NET Framework (up to and including .NET 4.6.2) and runtime OS in the following order of preference: *Cng, *CryptoServiceProvider, *Managed. AesCng and TripleDesCng will not be utilized under Windows 7, as despite that they are available under .NET 4.6.2 on Windows 7, their implementation under Windows 7 does not include support for symmetric keys, which is required. Only algorithms backed by a System.Security.Cryptography class available under the project's target .NET Framework and runtime OS will be added to this array when the component is created.

Note on FIPS compliance: If the system security policy dictates that only FIPS-certified algorithms may be used, only algorithms backed by FIPS-certified System.Security.Cryptography classes available under the project's target .NET Framework and runtime OS will be added to this array when the component is created. If non-certified algorithms are added to the collection, they will be removed prior to establishing a connection.

See Also

Reference

Connection Class
Connection Members


Server2ClientMACs Property

[image]
PowerTCP SSH and SFTP for .NET
Server2ClientMACs Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : Server2ClientMACs Property

Glossary Item Box

Returns a list of macs available for the server-to-client direction, in order of preference.

Syntax

Visual Basic (Declaration)
Public Property Server2ClientMACs As String()
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value() As String

instance.Server2ClientMACs = value

value = instance.Server2ClientMACs
C#
public string[] Server2ClientMACs {get; set;}
Managed Extensions for C++
public: __property string*[]* get_Server2ClientMACs();
public: __property void set_Server2ClientMACs(
   string*[]* value
);
C++/CLI
public:
property array<String^>^ Server2ClientMACs {
   array<String^>^ get();
   void set (    array<String^>^ value);
}

Remarks

By default, the array contains the following strings:

  • hmac-sha2-512
  • hmac-sha2-256
  • hmac-sha1
  • hmac-sha1-96
  • hmac-md5
  • hmac-md5-96

This array can be modified to remove unwanted MACs, or to re-order the list for preference.

The algorithms specified in this array will be backed by the corresponding System.Security.Cryptography classes available under the project's target .NET Framework (up to and including .NET 4.6.2) and runtime OS in the following order of preference: *Cng, *CryptoServiceProvider, *Managed. Only algorithms backed by a System.Security.Cryptography class available under the project's target .NET Framework and runtime OS will be added to this array when the component is created.

Note on FIPS compliance: If the system security policy dictates that only FIPS-certified algorithms may be used, only algorithms backed by FIPS-certified System.Security.Cryptography classes available under the project's target .NET Framework and runtime OS will be added to this array when the component is created. If non-certified algorithms are added to the collection, they will be removed prior to establishing a connection.

See Also

Reference

Connection Class
Connection Members


ServerHostKeyAlgorithms Property

[image]
PowerTCP SSH and SFTP for .NET
ServerHostKeyAlgorithms Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : ServerHostKeyAlgorithms Property

Glossary Item Box

Returns a list of supported host key algorithms, in order of preference.

Syntax

Visual Basic (Declaration)
Public Property ServerHostKeyAlgorithms As String()
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value() As String

instance.ServerHostKeyAlgorithms = value

value = instance.ServerHostKeyAlgorithms
C#
public string[] ServerHostKeyAlgorithms {get; set;}
Managed Extensions for C++
public: __property string*[]* get_ServerHostKeyAlgorithms();
public: __property void set_ServerHostKeyAlgorithms(
   string*[]* value
);
C++/CLI
public:
property array<String^>^ ServerHostKeyAlgorithms {
   array<String^>^ get();
   void set (    array<String^>^ value);
}

Property Value

An array of supported server host key algorithms.

Remarks

SSH-2 defines ssh-dss and ssh-rsa. The entries of the array must be ordered by preference. At least one entry must be specified.

See Also

Reference

Connection Class
Connection Members


TcpNoDelay Property

[image]
PowerTCP SSH and SFTP for .NET
TcpNoDelay Property
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : TcpNoDelay Property

Glossary Item Box

Enables TCP_NODELAY (Nagle's algorithm) on the underlying socket.

Syntax

Visual Basic (Declaration)
Public Property TcpNoDelay As Boolean
Visual Basic (Usage) Copy Code
Dim instance As Connection
Dim value As Boolean

instance.TcpNoDelay = value

value = instance.TcpNoDelay
C#
public bool TcpNoDelay {get; set;}
Managed Extensions for C++
public: __property bool get_TcpNoDelay();
public: __property void set_TcpNoDelay(
   bool value
);
C++/CLI
public:
property bool TcpNoDelay {
   bool get();
   void set (    bool value);
}

Property Value

If the connection has not yet been established, the value will be stored and set after the socket has been created.

See Also

Reference

Connection Class
Connection Members


Connection Class Fields

[image]
PowerTCP SSH and SFTP for .NET
Connection Class Fields
See Also Send comments on this topic
Dart.Ssh Namespace : Connection Class

Glossary Item Box

For a list of all members of this type, see Connection members.

Public Fields

 | Name | Description
Public Field | Identification | The identifier presented to the SSH-2 server.
Top

See Also

Reference

Connection Class
Dart.Ssh Namespace


Identification Field

[image]
PowerTCP SSH and SFTP for .NET
Identification Field
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : Identification Field

Glossary Item Box

The identifier presented to the SSH-2 server.

Syntax

Visual Basic (Declaration)
Public Const Identification As String
Visual Basic (Usage) Copy Code
Dim value As String

value = Connection.Identification
C#
public const string Identification
Managed Extensions for C++
public: const string* Identification
C++/CLI
public:
const String^ Identification

See Also

Reference

Connection Class
Connection Members


ConnectionInfo Class

[image]
PowerTCP SSH and SFTP for .NET
ConnectionInfo Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : ConnectionInfo Class

Glossary Item Box

Provides details about an established SSH-2 connection.

Object Model

ConnectionInfo Class

Syntax

Visual Basic (Declaration)
Public Class ConnectionInfo
Visual Basic (Usage) Copy Code
Dim instance As ConnectionInfo
C#
public class ConnectionInfo
Managed Extensions for C++
public __gc class ConnectionInfo
C++/CLI
public ref class ConnectionInfo

Inheritance Hierarchy

System.Object
Dart.Ssh.ConnectionInfo

See Also

Reference

ConnectionInfo Members
Dart.Ssh Namespace


ConnectionInfo Class Members

[image]
PowerTCP SSH and SFTP for .NET
ConnectionInfo Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : ConnectionInfo Class

Glossary Item Box

The following tables list the members exposed by ConnectionInfo.

Public Properties

 | Name | Description
Public Property | ClientToServerCompressionMethod | The compression method used for sending packets from the client to the server.
Public Property | ClientToServerCryptoAlgorithm | The crypto algorithm used for packets from the client to the server.
Public Property | ClientToServerMACAlgorithm | The MAC algorithm used for packets from the client to the server.
Public Property | KeyExchangeAlgorithm | The key exchange (KEX) algorithm used in the latest key exchange.
Public Property | KeyExchangeCounter | The number of key exchanges performed on this connection thus far.
Public Property | ServerHostKey | The server host key sent during the latest key exchange.
Public Property | ServerHostKeyAlgorithm | The type of server host key (currently either "ssh-dss" or "ssh-rsa").
Public Property | ServerToClientCompressionMethod | The compression method used for sending packets from the server to the client.
Public Property | ServerToClientCryptoAlgorithm | The crypto algorithm used for packets from the server to the client.
Public Property | ServerToClientMACAlgorithm | The MAC algorithm used for packets from the server to the client.
Top

See Also

Reference

ConnectionInfo Class
Dart.Ssh Namespace


ConnectionInfo Class Properties

[image]
PowerTCP SSH and SFTP for .NET
ConnectionInfo Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : ConnectionInfo Class

Glossary Item Box

For a list of all members of this type, see ConnectionInfo members.

Public Properties

 | Name | Description
Public Property | ClientToServerCompressionMethod | The compression method used for sending packets from the client to the server.
Public Property | ClientToServerCryptoAlgorithm | The crypto algorithm used for packets from the client to the server.
Public Property | ClientToServerMACAlgorithm | The MAC algorithm used for packets from the client to the server.
Public Property | KeyExchangeAlgorithm | The key exchange (KEX) algorithm used in the latest key exchange.
Public Property | KeyExchangeCounter | The number of key exchanges performed on this connection thus far.
Public Property | ServerHostKey | The server host key sent during the latest key exchange.
Public Property | ServerHostKeyAlgorithm | The type of server host key (currently either "ssh-dss" or "ssh-rsa").
Public Property | ServerToClientCompressionMethod | The compression method used for sending packets from the server to the client.
Public Property | ServerToClientCryptoAlgorithm | The crypto algorithm used for packets from the server to the client.
Public Property | ServerToClientMACAlgorithm | The MAC algorithm used for packets from the server to the client.
Top

See Also

Reference

ConnectionInfo Class
Dart.Ssh Namespace


ClientToServerCompressionMethod Property

[image]
PowerTCP SSH and SFTP for .NET
ClientToServerCompressionMethod Property
See Also Send comments on this topic
Dart.Ssh Namespace > ConnectionInfo Class : ClientToServerCompressionMethod Property

Glossary Item Box

The compression method used for sending packets from the client to the server.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ClientToServerCompressionMethod As String
Visual Basic (Usage) Copy Code
Dim instance As ConnectionInfo
Dim value As String

value = instance.ClientToServerCompressionMethod
C#
public string ClientToServerCompressionMethod {get;}
Managed Extensions for C++
public: __property string* get_ClientToServerCompressionMethod();
C++/CLI
public:
property String^ ClientToServerCompressionMethod {
   String^ get();
}

See Also

Reference

ConnectionInfo Class
ConnectionInfo Members


ClientToServerCryptoAlgorithm Property

[image]
PowerTCP SSH and SFTP for .NET
ClientToServerCryptoAlgorithm Property
See Also Send comments on this topic
Dart.Ssh Namespace > ConnectionInfo Class : ClientToServerCryptoAlgorithm Property

Glossary Item Box

The crypto algorithm used for packets from the client to the server.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ClientToServerCryptoAlgorithm As String
Visual Basic (Usage) Copy Code
Dim instance As ConnectionInfo
Dim value As String

value = instance.ClientToServerCryptoAlgorithm
C#
public string ClientToServerCryptoAlgorithm {get;}
Managed Extensions for C++
public: __property string* get_ClientToServerCryptoAlgorithm();
C++/CLI
public:
property String^ ClientToServerCryptoAlgorithm {
   String^ get();
}

See Also

Reference

ConnectionInfo Class
ConnectionInfo Members


ClientToServerMACAlgorithm Property

[image]
PowerTCP SSH and SFTP for .NET
ClientToServerMACAlgorithm Property
See Also Send comments on this topic
Dart.Ssh Namespace > ConnectionInfo Class : ClientToServerMACAlgorithm Property

Glossary Item Box

The MAC algorithm used for packets from the client to the server.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ClientToServerMACAlgorithm As String
Visual Basic (Usage) Copy Code
Dim instance As ConnectionInfo
Dim value As String

value = instance.ClientToServerMACAlgorithm
C#
public string ClientToServerMACAlgorithm {get;}
Managed Extensions for C++
public: __property string* get_ClientToServerMACAlgorithm();
C++/CLI
public:
property String^ ClientToServerMACAlgorithm {
   String^ get();
}

See Also

Reference

ConnectionInfo Class
ConnectionInfo Members


KeyExchangeAlgorithm Property

[image]
PowerTCP SSH and SFTP for .NET
KeyExchangeAlgorithm Property
See Also Send comments on this topic
Dart.Ssh Namespace > ConnectionInfo Class : KeyExchangeAlgorithm Property

Glossary Item Box

The key exchange (KEX) algorithm used in the latest key exchange.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property KeyExchangeAlgorithm As String
Visual Basic (Usage) Copy Code
Dim instance As ConnectionInfo
Dim value As String

value = instance.KeyExchangeAlgorithm
C#
public string KeyExchangeAlgorithm {get;}
Managed Extensions for C++
public: __property string* get_KeyExchangeAlgorithm();
C++/CLI
public:
property String^ KeyExchangeAlgorithm {
   String^ get();
}

See Also

Reference

ConnectionInfo Class
ConnectionInfo Members


KeyExchangeCounter Property

[image]
PowerTCP SSH and SFTP for .NET
KeyExchangeCounter Property
See Also Send comments on this topic
Dart.Ssh Namespace > ConnectionInfo Class : KeyExchangeCounter Property

Glossary Item Box

The number of key exchanges performed on this connection thus far.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property KeyExchangeCounter As Integer
Visual Basic (Usage) Copy Code
Dim instance As ConnectionInfo
Dim value As Integer

value = instance.KeyExchangeCounter
C#
public int KeyExchangeCounter {get;}
Managed Extensions for C++
public: __property int get_KeyExchangeCounter();
C++/CLI
public:
property int KeyExchangeCounter {
   int get();
}

See Also

Reference

ConnectionInfo Class
ConnectionInfo Members


ServerHostKey Property

[image]
PowerTCP SSH and SFTP for .NET
ServerHostKey Property
See Also Send comments on this topic
Dart.Ssh Namespace > ConnectionInfo Class : ServerHostKey Property

Glossary Item Box

The server host key sent during the latest key exchange.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ServerHostKey As Byte()
Visual Basic (Usage) Copy Code
Dim instance As ConnectionInfo
Dim value() As Byte

value = instance.ServerHostKey
C#
public byte[] ServerHostKey {get;}
Managed Extensions for C++
public: __property byte[]* get_ServerHostKey();
C++/CLI
public:
property array<byte>^ ServerHostKey {
   array<byte>^ get();
}

See Also

Reference

ConnectionInfo Class
ConnectionInfo Members


ServerHostKeyAlgorithm Property

[image]
PowerTCP SSH and SFTP for .NET
ServerHostKeyAlgorithm Property
See Also Send comments on this topic
Dart.Ssh Namespace > ConnectionInfo Class : ServerHostKeyAlgorithm Property

Glossary Item Box

The type of server host key (currently either "ssh-dss" or "ssh-rsa").

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ServerHostKeyAlgorithm As String
Visual Basic (Usage) Copy Code
Dim instance As ConnectionInfo
Dim value As String

value = instance.ServerHostKeyAlgorithm
C#
public string ServerHostKeyAlgorithm {get;}
Managed Extensions for C++
public: __property string* get_ServerHostKeyAlgorithm();
C++/CLI
public:
property String^ ServerHostKeyAlgorithm {
   String^ get();
}

See Also

Reference

ConnectionInfo Class
ConnectionInfo Members


ServerToClientCompressionMethod Property

[image]
PowerTCP SSH and SFTP for .NET
ServerToClientCompressionMethod Property
See Also Send comments on this topic
Dart.Ssh Namespace > ConnectionInfo Class : ServerToClientCompressionMethod Property

Glossary Item Box

The compression method used for sending packets from the server to the client.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ServerToClientCompressionMethod As String
Visual Basic (Usage) Copy Code
Dim instance As ConnectionInfo
Dim value As String

value = instance.ServerToClientCompressionMethod
C#
public string ServerToClientCompressionMethod {get;}
Managed Extensions for C++
public: __property string* get_ServerToClientCompressionMethod();
C++/CLI
public:
property String^ ServerToClientCompressionMethod {
   String^ get();
}

See Also

Reference

ConnectionInfo Class
ConnectionInfo Members


ServerToClientCryptoAlgorithm Property

[image]
PowerTCP SSH and SFTP for .NET
ServerToClientCryptoAlgorithm Property
See Also Send comments on this topic
Dart.Ssh Namespace > ConnectionInfo Class : ServerToClientCryptoAlgorithm Property

Glossary Item Box

The crypto algorithm used for packets from the server to the client.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ServerToClientCryptoAlgorithm As String
Visual Basic (Usage) Copy Code
Dim instance As ConnectionInfo
Dim value As String

value = instance.ServerToClientCryptoAlgorithm
C#
public string ServerToClientCryptoAlgorithm {get;}
Managed Extensions for C++
public: __property string* get_ServerToClientCryptoAlgorithm();
C++/CLI
public:
property String^ ServerToClientCryptoAlgorithm {
   String^ get();
}

See Also

Reference

ConnectionInfo Class
ConnectionInfo Members


ServerToClientMACAlgorithm Property

[image]
PowerTCP SSH and SFTP for .NET
ServerToClientMACAlgorithm Property
See Also Send comments on this topic
Dart.Ssh Namespace > ConnectionInfo Class : ServerToClientMACAlgorithm Property

Glossary Item Box

The MAC algorithm used for packets from the server to the client.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ServerToClientMACAlgorithm As String
Visual Basic (Usage) Copy Code
Dim instance As ConnectionInfo
Dim value As String

value = instance.ServerToClientMACAlgorithm
C#
public string ServerToClientMACAlgorithm {get;}
Managed Extensions for C++
public: __property string* get_ServerToClientMACAlgorithm();
C++/CLI
public:
property String^ ServerToClientMACAlgorithm {
   String^ get();
}

See Also

Reference

ConnectionInfo Class
ConnectionInfo Members


CopyResult Class

[image]
PowerTCP SSH and SFTP for .NET
CopyResult Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : CopyResult Class

Glossary Item Box

Provides the results of a copy operation (in uncompressed bytes).

Object Model

CopyResult Class

Syntax

Visual Basic (Declaration)
Public Class CopyResult
   Inherits RemoveResult
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
C#
public class CopyResult : RemoveResult
Managed Extensions for C++
public __gc class CopyResult : public RemoveResult
C++/CLI
public ref class CopyResult : public RemoveResult

Inheritance Hierarchy

System.Object
Dart.Ssh.RemoveResult
Dart.Ssh.CopyResult

See Also

Reference

CopyResult Members
Dart.Ssh Namespace


CopyResult Class Members

[image]
PowerTCP SSH and SFTP for .NET
CopyResult Class Members
See Also Properties Methods Send comments on this topic
Dart.Ssh Namespace : CopyResult Class

Glossary Item Box

The following tables list the members exposed by CopyResult.

Public Properties

 | Name | Description
Public Property | Action | Gets the requested action (either CopyAction.Get or CopyAction.Put).
Public Property | Count | Gets the total number of bytes copied. Will be less than Position when appending to an existing file.
Public Property | CountEx | Gets the number of bytes copied as a float.
Public Property | DateTimeSet | Returns true if the DateTime of the destination file was updated to the DateTime of the source.
Public Property | IsDirectory | Returns true if the item is a directory. (Inherited from Dart.Ssh.RemoveResult)
Public Property | Length | Gets the size of the file being copied.
Public Property | LengthEx | Gets the number of bytes in the file being copied as a float. May be 0 if the size of the file is not known.
Public Property | LocalPath | Gets the absolute path of the file on the client.
Public Property | Mode | Gets the technique used for the copy (Copy, Synchronize, Restart or Append).
Public Property | Percentage | Gets the percentage (0-100) of bytes transferred in the copied file.
Public Property | Position | Gets the current position within the file being copied.
Public Property | PositionEx | Gets the position within the file being copied as a float.
Public Property | RemotePath | Gets the absolute path of the file or folder on the server. (Inherited from Dart.Ssh.RemoveResult)
Public Property | StartTime | Gets the time that the copy action started.
Public Property | Status | Gets the status of the copy operation.
Public Property | UserToken | Gets the token that represents this copy operation
Top

Public Methods

 | Name | Description
Public Method | GetException | Gets any Exception that occurred during the operation. (Inherited from Dart.Ssh.RemoveResult)
Top

See Also

Reference

CopyResult Class
Dart.Ssh Namespace


CopyResult Class Properties

[image]
PowerTCP SSH and SFTP for .NET
CopyResult Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : CopyResult Class

Glossary Item Box

For a list of all members of this type, see CopyResult members.

Public Properties

 | Name | Description
Public Property | Action | Gets the requested action (either CopyAction.Get or CopyAction.Put).
Public Property | Count | Gets the total number of bytes copied. Will be less than Position when appending to an existing file.
Public Property | CountEx | Gets the number of bytes copied as a float.
Public Property | DateTimeSet | Returns true if the DateTime of the destination file was updated to the DateTime of the source.
Public Property | IsDirectory | Returns true if the item is a directory. (Inherited from Dart.Ssh.RemoveResult)
Public Property | Length | Gets the size of the file being copied.
Public Property | LengthEx | Gets the number of bytes in the file being copied as a float. May be 0 if the size of the file is not known.
Public Property | LocalPath | Gets the absolute path of the file on the client.
Public Property | Mode | Gets the technique used for the copy (Copy, Synchronize, Restart or Append).
Public Property | Percentage | Gets the percentage (0-100) of bytes transferred in the copied file.
Public Property | Position | Gets the current position within the file being copied.
Public Property | PositionEx | Gets the position within the file being copied as a float.
Public Property | RemotePath | Gets the absolute path of the file or folder on the server. (Inherited from Dart.Ssh.RemoveResult)
Public Property | StartTime | Gets the time that the copy action started.
Public Property | Status | Gets the status of the copy operation.
Public Property | UserToken | Gets the token that represents this copy operation
Top

See Also

Reference

CopyResult Class
Dart.Ssh Namespace


Action Property

[image]
PowerTCP SSH and SFTP for .NET
Action Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : Action Property

Glossary Item Box

Gets the requested action (either CopyAction.Get or CopyAction.Put).

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Action As CopyAction
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As CopyAction

value = instance.Action
C#
public CopyAction Action {get;}
Managed Extensions for C++
public: __property CopyAction get_Action();
C++/CLI
public:
property CopyAction Action {
   CopyAction get();
}

See Also

Reference

CopyResult Class
CopyResult Members


Count Property

[image]
PowerTCP SSH and SFTP for .NET
Count Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : Count Property

Glossary Item Box

Gets the total number of bytes copied. Will be less than Position when appending to an existing file.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Count As Long
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As Long

value = instance.Count
C#
public long Count {get;}
Managed Extensions for C++
public: __property long get_Count();
C++/CLI
public:
property int64 Count {
   int64 get();
}

See Also

Reference

CopyResult Class
CopyResult Members


CountEx Property

[image]
PowerTCP SSH and SFTP for .NET
CountEx Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : CountEx Property

Glossary Item Box

Gets the number of bytes copied as a float.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property CountEx As Single
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As Single

value = instance.CountEx
C#
public float CountEx {get;}
Managed Extensions for C++
public: __property float get_CountEx();
C++/CLI
public:
property float CountEx {
   float get();
}

See Also

Reference

CopyResult Class
CopyResult Members


DateTimeSet Property

[image]
PowerTCP SSH and SFTP for .NET
DateTimeSet Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : DateTimeSet Property

Glossary Item Box

Returns true if the DateTime of the destination file was updated to the DateTime of the source.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property DateTimeSet As Boolean
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As Boolean

value = instance.DateTimeSet
C#
public bool DateTimeSet {get;}
Managed Extensions for C++
public: __property bool get_DateTimeSet();
C++/CLI
public:
property bool DateTimeSet {
   bool get();
}

Remarks

The MFMT command is used to set the DateTime of a file transfered to a server. This property can only return true for stored files if the server supports this command.

See Also

Reference

CopyResult Class
CopyResult Members


Length Property

[image]
PowerTCP SSH and SFTP for .NET
Length Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : Length Property

Glossary Item Box

Gets the size of the file being copied.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Length As Long
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As Long

value = instance.Length
C#
public long Length {get;}
Managed Extensions for C++
public: __property long get_Length();
C++/CLI
public:
property int64 Length {
   int64 get();
}

See Also

Reference

CopyResult Class
CopyResult Members


LengthEx Property

[image]
PowerTCP SSH and SFTP for .NET
LengthEx Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : LengthEx Property

Glossary Item Box

Gets the number of bytes in the file being copied as a float. May be 0 if the size of the file is not known.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property LengthEx As Single
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As Single

value = instance.LengthEx
C#
public float LengthEx {get;}
Managed Extensions for C++
public: __property float get_LengthEx();
C++/CLI
public:
property float LengthEx {
   float get();
}

See Also

Reference

CopyResult Class
CopyResult Members


LocalPath Property

[image]
PowerTCP SSH and SFTP for .NET
LocalPath Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : LocalPath Property

Glossary Item Box

Gets the absolute path of the file on the client.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property LocalPath As String
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As String

value = instance.LocalPath
C#
public string LocalPath {get;}
Managed Extensions for C++
public: __property string* get_LocalPath();
C++/CLI
public:
property String^ LocalPath {
   String^ get();
}

See Also

Reference

CopyResult Class
CopyResult Members


Mode Property

[image]
PowerTCP SSH and SFTP for .NET
Mode Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : Mode Property

Glossary Item Box

Gets the technique used for the copy (Copy, Synchronize, Restart or Append).

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Mode As CopyMode
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As CopyMode

value = instance.Mode
C#
public CopyMode Mode {get;}
Managed Extensions for C++
public: __property CopyMode get_Mode();
C++/CLI
public:
property CopyMode Mode {
   CopyMode get();
}

See Also

Reference

CopyResult Class
CopyResult Members


Percentage Property

[image]
PowerTCP SSH and SFTP for .NET
Percentage Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : Percentage Property

Glossary Item Box

Gets the percentage (0-100) of bytes transferred in the copied file.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Percentage As Integer
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As Integer

value = instance.Percentage
C#
public int Percentage {get;}
Managed Extensions for C++
public: __property int get_Percentage();
C++/CLI
public:
property int Percentage {
   int get();
}

See Also

Reference

CopyResult Class
CopyResult Members


Position Property

[image]
PowerTCP SSH and SFTP for .NET
Position Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : Position Property

Glossary Item Box

Gets the current position within the file being copied.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Position As Long
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As Long

value = instance.Position
C#
public long Position {get;}
Managed Extensions for C++
public: __property long get_Position();
C++/CLI
public:
property int64 Position {
   int64 get();
}

See Also

Reference

CopyResult Class
CopyResult Members


PositionEx Property

[image]
PowerTCP SSH and SFTP for .NET
PositionEx Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : PositionEx Property

Glossary Item Box

Gets the position within the file being copied as a float.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property PositionEx As Single
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As Single

value = instance.PositionEx
C#
public float PositionEx {get;}
Managed Extensions for C++
public: __property float get_PositionEx();
C++/CLI
public:
property float PositionEx {
   float get();
}

See Also

Reference

CopyResult Class
CopyResult Members


StartTime Property

[image]
PowerTCP SSH and SFTP for .NET
StartTime Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : StartTime Property

Glossary Item Box

Gets the time that the copy action started.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property StartTime As Date
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As Date

value = instance.StartTime
C#
public DateTime StartTime {get;}
Managed Extensions for C++
public: __property DateTime get_StartTime();
C++/CLI
public:
property DateTime StartTime {
   DateTime get();
}

See Also

Reference

CopyResult Class
CopyResult Members


Status Property

[image]
PowerTCP SSH and SFTP for .NET
Status Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : Status Property

Glossary Item Box

Gets the status of the copy operation.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Status As CopyStatus
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As CopyStatus

value = instance.Status
C#
public CopyStatus Status {get;}
Managed Extensions for C++
public: __property CopyStatus get_Status();
C++/CLI
public:
property CopyStatus Status {
   CopyStatus get();
}

See Also

Reference

CopyResult Class
CopyResult Members


UserToken Property

[image]
PowerTCP SSH and SFTP for .NET
UserToken Property
See Also Send comments on this topic
Dart.Ssh Namespace > CopyResult Class : UserToken Property

Glossary Item Box

Gets the token that represents this copy operation

Syntax

Visual Basic (Declaration)
Public ReadOnly Property UserToken As Object
Visual Basic (Usage) Copy Code
Dim instance As CopyResult
Dim value As Object

value = instance.UserToken
C#
public object UserToken {get;}
Managed Extensions for C++
public: __property Object* get_UserToken();
C++/CLI
public:
property Object^ UserToken {
   Object^ get();
}

See Also

Reference

CopyResult Class
CopyResult Members


DartLicenseException Class

[image]
PowerTCP SSH and SFTP for .NET
DartLicenseException Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : DartLicenseException Class

Glossary Item Box

The base class for all Dart component license exceptions.

Object Model

DartLicenseException Class

Syntax

Visual Basic (Declaration)
<SerializableAttribute()>
Public Class DartLicenseException
   Inherits System.Exception
Visual Basic (Usage) Copy Code
Dim instance As DartLicenseException
C#
[Serializable()]
public class DartLicenseException : System.Exception
Managed Extensions for C++
[Serializable()]
public __gc class DartLicenseException : public System.Exception
C++/CLI
[Serializable()]
public ref class DartLicenseException : public System.Exception

Remarks

Use the DartLicenseException class to catch runtime licensing exceptions. These exceptions are thrown at component creation time and during access of select properties or methods. The Message property will provide a description of the specific licensing problem encountered. The InnerException property should also be examined for additional details.

Inheritance Hierarchy

System.Object
System.Exception
Dart.Ssh.DartLicenseException

See Also

Reference

DartLicenseException Members
Dart.Ssh Namespace


DartLicenseException Class Members

[image]
PowerTCP SSH and SFTP for .NET
DartLicenseException Class Members
See Also Properties Methods Events Send comments on this topic
Dart.Ssh Namespace : DartLicenseException Class

Glossary Item Box

The following tables list the members exposed by DartLicenseException.

Public Properties

 | Name | Description
Public Property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from System.Exception)
Public Property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from System.Exception)
Public Property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from System.Exception)
Public Property | InnerException | Gets the System.Exception instance that caused the current exception. (Inherited from System.Exception)
Public Property | Message | Gets a message that describes the current exception. (Inherited from System.Exception)
Public Property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from System.Exception)
Public Property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from System.Exception)
Public Property | TargetSite | Gets the method that throws the current exception. (Inherited from System.Exception)
Top

Public Methods

 | Name | Description
Public Method | GetBaseException | When overridden in a derived class, returns the System.Exception that is the root cause of one or more subsequent exceptions. (Inherited from System.Exception)
Public Method | GetObjectData | When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception. (Inherited from System.Exception)
Public Method | GetType | Gets the runtime type of the current instance. (Inherited from System.Exception)
Public Method | ToString | Creates and returns a string representation of the current exception. (Inherited from System.Exception)
Top

Protected Events

 | Name | Description
Protected Event | SerializeObjectState | Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Inherited from System.Exception)
Top

See Also

Reference

DartLicenseException Class
Dart.Ssh Namespace


Data Class

[image]
PowerTCP SSH and SFTP for .NET
Data Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : Data Class

Glossary Item Box

Encapsulates data read or written.

Object Model

Data Class

Syntax

Visual Basic (Declaration)
Public Class Data
   Inherits Segment
Visual Basic (Usage) Copy Code
Dim instance As Data
C#
public class Data : Segment
Managed Extensions for C++
public __gc class Data : public Segment
C++/CLI
public ref class Data : public Segment

Inheritance Hierarchy

System.Object
Dart.Ssh.Segment
Dart.Ssh.Data

See Also

Reference

Data Members
Dart.Ssh Namespace


Data Class Members

[image]
PowerTCP SSH and SFTP for .NET
Data Class Members
See Also Properties Methods Send comments on this topic
Dart.Ssh Namespace : Data Class

Glossary Item Box

The following tables list the members exposed by Data.

Public Properties

 | Name | Description
Public Property | Buffer | Gets the buffer that holds data. (Inherited from Dart.Ssh.Segment)
Public Property | Count | Byte count of data. (Inherited from Dart.Ssh.Segment)
Public Property | Delimiter | Gets the delimiter byte array used by SessionStream.Read or SessionStream.Read.
Public Property | Direction | Indicates whether data is inbound or outbound.
Public Property | Encoding | Gets the character encoding used by the object.
Public Property | Offset | The offset into the buffer where the data starts. (Inherited from Dart.Ssh.Segment)
Top

Public Methods

 | Name | Description
Public Method | ToString | Gets the data as a decoded string.
Top

See Also

Reference

Data Class
Dart.Ssh Namespace


Data Class Methods

[image]
PowerTCP SSH and SFTP for .NET
Data Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : Data Class

Glossary Item Box

For a list of all members of this type, see Data members.

Public Methods

 | Name | Description
Public Method | ToString | Gets the data as a decoded string.
Top

See Also

Reference

Data Class
Dart.Ssh Namespace


ToString Method

[image]
PowerTCP SSH and SFTP for .NET
ToString Method
See Also Send comments on this topic
Dart.Ssh Namespace > Data Class : ToString Method

Glossary Item Box

Gets the data as a decoded string.

Syntax

Visual Basic (Declaration)
Public Overrides Function ToString() As String
Visual Basic (Usage) Copy Code
Dim instance As Data
Dim value As String

value = instance.ToString()
C#
public override string ToString()
Managed Extensions for C++
public: string* ToString(); override
C++/CLI
public:
String^ ToString(); override

Return Value

The System.Buffer decoded into a string using Encoding.

See Also

Reference

Data Class
Data Members


Data Class Properties

[image]
PowerTCP SSH and SFTP for .NET
Data Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : Data Class

Glossary Item Box

For a list of all members of this type, see Data members.

Public Properties

 | Name | Description
Public Property | Buffer | Gets the buffer that holds data. (Inherited from Dart.Ssh.Segment)
Public Property | Count | Byte count of data. (Inherited from Dart.Ssh.Segment)
Public Property | Delimiter | Gets the delimiter byte array used by SessionStream.Read or SessionStream.Read.
Public Property | Direction | Indicates whether data is inbound or outbound.
Public Property | Encoding | Gets the character encoding used by the object.
Public Property | Offset | The offset into the buffer where the data starts. (Inherited from Dart.Ssh.Segment)
Top

See Also

Reference

Data Class
Dart.Ssh Namespace


Delimiter Property

[image]
PowerTCP SSH and SFTP for .NET
Delimiter Property
See Also Send comments on this topic
Dart.Ssh Namespace > Data Class : Delimiter Property

Glossary Item Box

Gets the delimiter byte array used by SessionStream.Read or SessionStream.Read.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Delimiter As Byte()
Visual Basic (Usage) Copy Code
Dim instance As Data
Dim value() As Byte

value = instance.Delimiter
C#
public byte[] Delimiter {get;}
Managed Extensions for C++
public: __property byte[]* get_Delimiter();
C++/CLI
public:
property array<byte>^ Delimiter {
   array<byte>^ get();
}

Property Value

Null if no delimiter was used or no delimiter was found. Otherwise, the delimiter byte array.

See Also

Reference

Data Class
Data Members


Direction Property

[image]
PowerTCP SSH and SFTP for .NET
Direction Property
See Also Send comments on this topic
Dart.Ssh Namespace > Data Class : Direction Property

Glossary Item Box

Indicates whether data is inbound or outbound.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Direction As DataDirection
Visual Basic (Usage) Copy Code
Dim instance As Data
Dim value As DataDirection

value = instance.Direction
C#
public DataDirection Direction {get;}
Managed Extensions for C++
public: __property DataDirection get_Direction();
C++/CLI
public:
property DataDirection Direction {
   DataDirection get();
}

See Also

Reference

Data Class
Data Members


Encoding Property

[image]
PowerTCP SSH and SFTP for .NET
Encoding Property
See Also Send comments on this topic
Dart.Ssh Namespace > Data Class : Encoding Property

Glossary Item Box

Gets the character encoding used by the object.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Encoding As Encoding
Visual Basic (Usage) Copy Code
Dim instance As Data
Dim value As Encoding

value = instance.Encoding
C#
public Encoding Encoding {get;}
Managed Extensions for C++
public: __property Encoding* get_Encoding();
C++/CLI
public:
property Encoding^ Encoding {
   Encoding^ get();
}

See Also

Reference

Data Class
Data Members


DataEventArgs Class

[image]
PowerTCP SSH and SFTP for .NET
DataEventArgs Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : DataEventArgs Class

Glossary Item Box

Provides data for reporting events.

Object Model

DataEventArgs ClassData Class

Syntax

Visual Basic (Declaration)
Public Class DataEventArgs
   Inherits UserStateEventArgs
Visual Basic (Usage) Copy Code
Dim instance As DataEventArgs
C#
public class DataEventArgs : UserStateEventArgs
Managed Extensions for C++
public __gc class DataEventArgs : public UserStateEventArgs
C++/CLI
public ref class DataEventArgs : public UserStateEventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
Dart.Ssh.UserStateEventArgs
Dart.Ssh.DataEventArgs
Dart.Ssh.SshDataEventArgs

See Also

Reference

DataEventArgs Members
Dart.Ssh Namespace


DataEventArgs Class Members

[image]
PowerTCP SSH and SFTP for .NET
DataEventArgs Class Members
See Also Properties Methods Send comments on this topic
Dart.Ssh Namespace : DataEventArgs Class

Glossary Item Box

The following tables list the members exposed by DataEventArgs.

Public Properties

 | Name | Description
Public Property | Data | Gets data provided by Data and Log events.
Public Property | Message | Returns the message argument provided by the Marshal method. (Inherited from Dart.Ssh.UserStateEventArgs)
Public Property | UserState | Returns the user state argument provided by the Marshal method. (Inherited from Dart.Ssh.UserStateEventArgs)
Top

Public Methods

 | Name | Description
Public Method | ToString | Gets the Data property as a decoded string.
Top

See Also

Reference

DataEventArgs Class
Dart.Ssh Namespace


DataEventArgs Class Methods

[image]
PowerTCP SSH and SFTP for .NET
DataEventArgs Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : DataEventArgs Class

Glossary Item Box

For a list of all members of this type, see DataEventArgs members.

Public Methods

 | Name | Description
Public Method | ToString | Gets the Data property as a decoded string.
Top

See Also

Reference

DataEventArgs Class
Dart.Ssh Namespace


ToString Method

[image]
PowerTCP SSH and SFTP for .NET
ToString Method
See Also Send comments on this topic
Dart.Ssh Namespace > DataEventArgs Class : ToString Method

Glossary Item Box

Gets the Data property as a decoded string.

Syntax

Visual Basic (Declaration)
Public Overrides Function ToString() As String
Visual Basic (Usage) Copy Code
Dim instance As DataEventArgs
Dim value As String

value = instance.ToString()
C#
public override string ToString()
Managed Extensions for C++
public: string* ToString(); override
C++/CLI
public:
String^ ToString(); override

Return Value

The Data.Buffer decoded into a string using the Data.Encoding specified.

See Also

Reference

DataEventArgs Class
DataEventArgs Members


DataEventArgs Class Properties

[image]
PowerTCP SSH and SFTP for .NET
DataEventArgs Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : DataEventArgs Class

Glossary Item Box

For a list of all members of this type, see DataEventArgs members.

Public Properties

 | Name | Description
Public Property | Data | Gets data provided by Data and Log events.
Public Property | Message | Returns the message argument provided by the Marshal method. (Inherited from Dart.Ssh.UserStateEventArgs)
Public Property | UserState | Returns the user state argument provided by the Marshal method. (Inherited from Dart.Ssh.UserStateEventArgs)
Top

See Also

Reference

DataEventArgs Class
Dart.Ssh Namespace


Data Property

[image]
PowerTCP SSH and SFTP for .NET
Data Property
See Also Send comments on this topic
Dart.Ssh Namespace > DataEventArgs Class : Data Property

Glossary Item Box

Gets data provided by Data and Log events.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Data As Data
Visual Basic (Usage) Copy Code
Dim instance As DataEventArgs
Dim value As Data

value = instance.Data
C#
public Data Data {get;}
Managed Extensions for C++
public: __property Data* get_Data();
C++/CLI
public:
property Data^ Data {
   Data^ get();
}

See Also

Reference

DataEventArgs Class
DataEventArgs Members


DebugData Class

[image]
PowerTCP SSH and SFTP for .NET
DebugData Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : DebugData Class

Glossary Item Box

Provides Debug information.

Object Model

DebugData Class

Syntax

Visual Basic (Declaration)
Public Class DebugData
Visual Basic (Usage) Copy Code
Dim instance As DebugData
C#
public class DebugData
Managed Extensions for C++
public __gc class DebugData
C++/CLI
public ref class DebugData

Inheritance Hierarchy

System.Object
Dart.Ssh.DebugData

See Also

Reference

DebugData Members
Dart.Ssh Namespace


DebugData Class Members

[image]
PowerTCP SSH and SFTP for .NET
DebugData Class Members
See Also Fields Methods Send comments on this topic
Dart.Ssh Namespace : DebugData Class

Glossary Item Box

The following tables list the members exposed by DebugData.

Public Fields

 | Name | Description
Public Field | Direction | Indicates whether data is incoming (received) or outgoing (sent).
Public Field | Id | The packet request or response id.
Public Field | Message | Readable information associated with the packet.
Public Field | Packet | The encoded packet.
Public Field | PacketType | The type of packet.
Top

Public Methods

 | Name | Description
Public Method | ToString | Gets the Debug data as a string.
Top

See Also

Reference

DebugData Class
Dart.Ssh Namespace


DebugData Class Methods

[image]
PowerTCP SSH and SFTP for .NET
DebugData Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : DebugData Class

Glossary Item Box

For a list of all members of this type, see DebugData members.

Public Methods

 | Name | Description
Public Method | ToString | Gets the Debug data as a string.
Top

See Also

Reference

DebugData Class
Dart.Ssh Namespace


ToString Method

[image]
PowerTCP SSH and SFTP for .NET
ToString Method
See Also Send comments on this topic
Dart.Ssh Namespace > DebugData Class : ToString Method

Glossary Item Box

Gets the Debug data as a string.

Syntax

Visual Basic (Declaration)
Public Overrides Function ToString() As String
Visual Basic (Usage) Copy Code
Dim instance As DebugData
Dim value As String

value = instance.ToString()
C#
public override string ToString()
Managed Extensions for C++
public: string* ToString(); override
C++/CLI
public:
String^ ToString(); override

See Also

Reference

DebugData Class
DebugData Members


DebugData Class Fields

[image]
PowerTCP SSH and SFTP for .NET
DebugData Class Fields
See Also Send comments on this topic
Dart.Ssh Namespace : DebugData Class

Glossary Item Box

For a list of all members of this type, see DebugData members.

Public Fields

 | Name | Description
Public Field | Direction | Indicates whether data is incoming (received) or outgoing (sent).
Public Field | Id | The packet request or response id.
Public Field | Message | Readable information associated with the packet.
Public Field | Packet | The encoded packet.
Public Field | PacketType | The type of packet.
Top

See Also

Reference

DebugData Class
Dart.Ssh Namespace


Direction Field

[image]
PowerTCP SSH and SFTP for .NET
Direction Field
See Also Send comments on this topic
Dart.Ssh Namespace > DebugData Class : Direction Field

Glossary Item Box

Indicates whether data is incoming (received) or outgoing (sent).

Syntax

Visual Basic (Declaration)
Public ReadOnly Direction As DataDirection
Visual Basic (Usage) Copy Code
Dim instance As DebugData
Dim value As DataDirection

value = instance.Direction
C#
public readonly DataDirection Direction
Managed Extensions for C++
public: readonly DataDirection Direction
C++/CLI
public:
readonly DataDirection Direction

See Also

Reference

DebugData Class
DebugData Members


Id Field

[image]
PowerTCP SSH and SFTP for .NET
Id Field
See Also Send comments on this topic
Dart.Ssh Namespace > DebugData Class : Id Field

Glossary Item Box

The packet request or response id.

Syntax

Visual Basic (Declaration)
Public Id As UInteger
Visual Basic (Usage) Copy Code
Dim instance As DebugData
Dim value As UInteger

value = instance.Id

instance.Id = value
C#
public uint Id
Managed Extensions for C++
public: uint Id
C++/CLI
public:
uint Id

See Also

Reference

DebugData Class
DebugData Members


Message Field

[image]
PowerTCP SSH and SFTP for .NET
Message Field
See Also Send comments on this topic
Dart.Ssh Namespace > DebugData Class : Message Field

Glossary Item Box

Readable information associated with the packet.

Syntax

Visual Basic (Declaration)
Public Message As String
Visual Basic (Usage) Copy Code
Dim instance As DebugData
Dim value As String

value = instance.Message

instance.Message = value
C#
public string Message
Managed Extensions for C++
public: string* Message
C++/CLI
public:
String^ Message

See Also

Reference

DebugData Class
DebugData Members


Packet Field

[image]
PowerTCP SSH and SFTP for .NET
Packet Field
See Also Send comments on this topic
Dart.Ssh Namespace > DebugData Class : Packet Field

Glossary Item Box

The encoded packet.

Syntax

Visual Basic (Declaration)
Public Packet As Byte()
Visual Basic (Usage) Copy Code
Dim instance As DebugData
Dim value() As Byte

value = instance.Packet

instance.Packet = value
C#
public byte[] Packet
Managed Extensions for C++
public: byte[]* Packet
C++/CLI
public:
array<byte>^ Packet

See Also

Reference

DebugData Class
DebugData Members


PacketType Field

[image]
PowerTCP SSH and SFTP for .NET
PacketType Field
See Also Send comments on this topic
Dart.Ssh Namespace > DebugData Class : PacketType Field

Glossary Item Box

The type of packet.

Syntax

Visual Basic (Declaration)
Public PacketType As PacketType
Visual Basic (Usage) Copy Code
Dim instance As DebugData
Dim value As PacketType

value = instance.PacketType

instance.PacketType = value
C#
public PacketType PacketType
Managed Extensions for C++
public: PacketType PacketType
C++/CLI
public:
PacketType PacketType

See Also

Reference

DebugData Class
DebugData Members


DebugEventArgs Class

[image]
PowerTCP SSH and SFTP for .NET
DebugEventArgs Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : DebugEventArgs Class

Glossary Item Box

Provides data for the Debug event.

Object Model

DebugEventArgs ClassDebugData Class

Syntax

Visual Basic (Declaration)
Public Class DebugEventArgs
   Inherits BaseEventArgs
Visual Basic (Usage) Copy Code
Dim instance As DebugEventArgs
C#
public class DebugEventArgs : BaseEventArgs
Managed Extensions for C++
public __gc class DebugEventArgs : public BaseEventArgs
C++/CLI
public ref class DebugEventArgs : public BaseEventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
Dart.Ssh.BaseEventArgs
Dart.Ssh.DebugEventArgs

See Also

Reference

DebugEventArgs Members
Dart.Ssh Namespace


DebugEventArgs Class Members

[image]
PowerTCP SSH and SFTP for .NET
DebugEventArgs Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : DebugEventArgs Class

Glossary Item Box

The following tables list the members exposed by DebugEventArgs.

Public Properties

 | Name | Description
Public Property | Data | Gets debug data associated with a read or write.
Top

See Also

Reference

DebugEventArgs Class
Dart.Ssh Namespace


DebugEventArgs Class Properties

[image]
PowerTCP SSH and SFTP for .NET
DebugEventArgs Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : DebugEventArgs Class

Glossary Item Box

For a list of all members of this type, see DebugEventArgs members.

Public Properties

 | Name | Description
Public Property | Data | Gets debug data associated with a read or write.
Top

See Also

Reference

DebugEventArgs Class
Dart.Ssh Namespace


Data Property

[image]
PowerTCP SSH and SFTP for .NET
Data Property
See Also Send comments on this topic
Dart.Ssh Namespace > DebugEventArgs Class : Data Property

Glossary Item Box

Gets debug data associated with a read or write.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Data As DebugData
Visual Basic (Usage) Copy Code
Dim instance As DebugEventArgs
Dim value As DebugData

value = instance.Data
C#
public DebugData Data {get;}
Managed Extensions for C++
public: __property DebugData* get_Data();
C++/CLI
public:
property DebugData^ Data {
   DebugData^ get();
}

Remarks

If SSL encryption is being used then Data is reported prior to encrypting or after decrypting.

See Also

Reference

DebugEventArgs Class
DebugEventArgs Members


DHGexParameters Class

[image]
PowerTCP SSH and SFTP for .NET
DHGexParameters Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : DHGexParameters Class

Glossary Item Box

Used to specify parameters for the diffie-hellman group exchange.

Object Model

DHGexParameters Class

Syntax

Visual Basic (Declaration)
Public Class DHGexParameters
Visual Basic (Usage) Copy Code
Dim instance As DHGexParameters
C#
public class DHGexParameters
Managed Extensions for C++
public __gc class DHGexParameters
C++/CLI
public ref class DHGexParameters

Remarks

Only Pref_Group_Length is configurable, and must be within the range of 1024-8192.

Inheritance Hierarchy

System.Object
Dart.Ssh.DHGexParameters

See Also

Reference

DHGexParameters Members
Dart.Ssh Namespace


DHGexParameters Class Members

[image]
PowerTCP SSH and SFTP for .NET
DHGexParameters Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : DHGexParameters Class

Glossary Item Box

The following tables list the members exposed by DHGexParameters.

Public Properties

 | Name | Description
Public Property | Max_Group_Length | The maximum group length permitted, 8192.
Public Property | Min_Group_Length | The minimum group length permitted, 1024.
Public Property | Pref_Group_Length | The preferred group length.
Top

See Also

Reference

DHGexParameters Class
Dart.Ssh Namespace


DHGexParameters Class Properties

[image]
PowerTCP SSH and SFTP for .NET
DHGexParameters Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : DHGexParameters Class

Glossary Item Box

For a list of all members of this type, see DHGexParameters members.

Public Properties

 | Name | Description
Public Property | Max_Group_Length | The maximum group length permitted, 8192.
Public Property | Min_Group_Length | The minimum group length permitted, 1024.
Public Property | Pref_Group_Length | The preferred group length.
Top

See Also

Reference

DHGexParameters Class
Dart.Ssh Namespace


Max_Group_Length Property

[image]
PowerTCP SSH and SFTP for .NET
Max_Group_Length Property
See Also Send comments on this topic
Dart.Ssh Namespace > DHGexParameters Class : Max_Group_Length Property

Glossary Item Box

The maximum group length permitted, 8192.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Max_Group_Length As Integer
Visual Basic (Usage) Copy Code
Dim instance As DHGexParameters
Dim value As Integer

value = instance.Max_Group_Length
C#
public int Max_Group_Length {get;}
Managed Extensions for C++
public: __property int get_Max_Group_Length();
C++/CLI
public:
property int Max_Group_Length {
   int get();
}

See Also

Reference

DHGexParameters Class
DHGexParameters Members


Min_Group_Length Property

[image]
PowerTCP SSH and SFTP for .NET
Min_Group_Length Property
See Also Send comments on this topic
Dart.Ssh Namespace > DHGexParameters Class : Min_Group_Length Property

Glossary Item Box

The minimum group length permitted, 1024.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Min_Group_Length As Integer
Visual Basic (Usage) Copy Code
Dim instance As DHGexParameters
Dim value As Integer

value = instance.Min_Group_Length
C#
public int Min_Group_Length {get;}
Managed Extensions for C++
public: __property int get_Min_Group_Length();
C++/CLI
public:
property int Min_Group_Length {
   int get();
}

See Also

Reference

DHGexParameters Class
DHGexParameters Members


Pref_Group_Length Property

[image]
PowerTCP SSH and SFTP for .NET
Pref_Group_Length Property
See Also Send comments on this topic
Dart.Ssh Namespace > DHGexParameters Class : Pref_Group_Length Property

Glossary Item Box

The preferred group length.

Syntax

Visual Basic (Declaration)
Public Property Pref_Group_Length As Integer
Visual Basic (Usage) Copy Code
Dim instance As DHGexParameters
Dim value As Integer

instance.Pref_Group_Length = value

value = instance.Pref_Group_Length
C#
public int Pref_Group_Length {get; set;}
Managed Extensions for C++
public: __property int get_Pref_Group_Length();
public: __property void set_Pref_Group_Length(
   int value
);
C++/CLI
public:
property int Pref_Group_Length {
   int get();
   void set (    int value);
}

Remarks

This is the preferred group length, in bits, to be used with the Diffie Hellman Group Exchange KEX algorithm. Larger group lengths will result in more secure keys but also longer key generation times. Defaults to 2048, and must be within the range of 1024-8192.

See Also

Reference

DHGexParameters Class
DHGexParameters Members


ErrorEventArgs Class

[image]
PowerTCP SSH and SFTP for .NET
ErrorEventArgs Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : ErrorEventArgs Class

Glossary Item Box

Provides data for the Error event.

Object Model

ErrorEventArgs Class

Syntax

Visual Basic (Declaration)
Public Class ErrorEventArgs
   Inherits System.EventArgs
Visual Basic (Usage) Copy Code
Dim instance As ErrorEventArgs
C#
public class ErrorEventArgs : System.EventArgs
Managed Extensions for C++
public __gc class ErrorEventArgs : public System.EventArgs
C++/CLI
public ref class ErrorEventArgs : public System.EventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
Dart.Ssh.ErrorEventArgs

See Also

Reference

ErrorEventArgs Members
Dart.Ssh Namespace


ErrorEventArgs Class Members

[image]
PowerTCP SSH and SFTP for .NET
ErrorEventArgs Class Members
See Also Methods Send comments on this topic
Dart.Ssh Namespace : ErrorEventArgs Class

Glossary Item Box

The following tables list the members exposed by ErrorEventArgs.

Public Constructors

 | Name | Description
Public Constructor | ErrorEventArgs Constructor | Save an exception within this class.
Top

Public Methods

 | Name | Description
Public Method | GetException | Returns the Exception marshaled to the UI thread.
Top

See Also

Reference

ErrorEventArgs Class
Dart.Ssh Namespace


ErrorEventArgs Constructor

[image]
PowerTCP SSH and SFTP for .NET
ErrorEventArgs Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > ErrorEventArgs Class : ErrorEventArgs Constructor

exception
Exception to save.

Glossary Item Box

Save an exception within this class.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal exception As Exception _
)
Visual Basic (Usage) Copy Code
Dim exception As Exception

Dim instance As New ErrorEventArgs(exception)
C#
public ErrorEventArgs(
   Exception exception
)
Managed Extensions for C++
public: ErrorEventArgs(
   Exception* exception
)
C++/CLI
public:
ErrorEventArgs(
   Exception^ exception
)

Parameters

exception
Exception to save.

See Also

Reference

ErrorEventArgs Class
ErrorEventArgs Members


ErrorEventArgs Class Methods

[image]
PowerTCP SSH and SFTP for .NET
ErrorEventArgs Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : ErrorEventArgs Class

Glossary Item Box

For a list of all members of this type, see ErrorEventArgs members.

Public Methods

 | Name | Description
Public Method | GetException | Returns the Exception marshaled to the UI thread.
Top

See Also

Reference

ErrorEventArgs Class
Dart.Ssh Namespace


GetException Method

[image]
PowerTCP SSH and SFTP for .NET
GetException Method
See Also Send comments on this topic
Dart.Ssh Namespace > ErrorEventArgs Class : GetException Method

Glossary Item Box

Returns the Exception marshaled to the UI thread.

Syntax

Visual Basic (Declaration)
Public Function GetException() As Exception
Visual Basic (Usage) Copy Code
Dim instance As ErrorEventArgs
Dim value As Exception

value = instance.GetException()
C#
public Exception GetException()
Managed Extensions for C++
public: Exception* GetException();
C++/CLI
public:
Exception^ GetException();

Return Value

Exception

See Also

Reference

ErrorEventArgs Class
ErrorEventArgs Members


HostKeyEventArgs Class

[image]
PowerTCP SSH and SFTP for .NET
HostKeyEventArgs Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : HostKeyEventArgs Class

Glossary Item Box

Provides data for the SshConnection.HostKey event.

Object Model

HostKeyEventArgs Class

Syntax

Visual Basic (Declaration)
Public Class HostKeyEventArgs
   Inherits System.EventArgs
Visual Basic (Usage) Copy Code
Dim instance As HostKeyEventArgs
C#
public class HostKeyEventArgs : System.EventArgs
Managed Extensions for C++
public __gc class HostKeyEventArgs : public System.EventArgs
C++/CLI
public ref class HostKeyEventArgs : public System.EventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
Dart.Ssh.HostKeyEventArgs

See Also

Reference

HostKeyEventArgs Members
Dart.Ssh Namespace


HostKeyEventArgs Class Members

[image]
PowerTCP SSH and SFTP for .NET
HostKeyEventArgs Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : HostKeyEventArgs Class

Glossary Item Box

The following tables list the members exposed by HostKeyEventArgs.

Public Properties

 | Name | Description
Public Property | HostKey | Gets the host key being used by the SSH server.
Public Property | HostKeyAlgorithm | Gets the host key algorithm being used.
Public Property | Verified | Gets and sets a value that indicates the application has verified the host key.
Top

See Also

Reference

HostKeyEventArgs Class
Dart.Ssh Namespace


HostKeyEventArgs Class Properties

[image]
PowerTCP SSH and SFTP for .NET
HostKeyEventArgs Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : HostKeyEventArgs Class

Glossary Item Box

For a list of all members of this type, see HostKeyEventArgs members.

Public Properties

 | Name | Description
Public Property | HostKey | Gets the host key being used by the SSH server.
Public Property | HostKeyAlgorithm | Gets the host key algorithm being used.
Public Property | Verified | Gets and sets a value that indicates the application has verified the host key.
Top

See Also

Reference

HostKeyEventArgs Class
Dart.Ssh Namespace


HostKey Property

[image]
PowerTCP SSH and SFTP for .NET
HostKey Property
See Also Send comments on this topic
Dart.Ssh Namespace > HostKeyEventArgs Class : HostKey Property

Glossary Item Box

Gets the host key being used by the SSH server.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property HostKey As Byte()
Visual Basic (Usage) Copy Code
Dim instance As HostKeyEventArgs
Dim value() As Byte

value = instance.HostKey
C#
public byte[] HostKey {get;}
Managed Extensions for C++
public: __property byte[]* get_HostKey();
C++/CLI
public:
property array<byte>^ HostKey {
   array<byte>^ get();
}

See Also

Reference

HostKeyEventArgs Class
HostKeyEventArgs Members


HostKeyAlgorithm Property

[image]
PowerTCP SSH and SFTP for .NET
HostKeyAlgorithm Property
See Also Send comments on this topic
Dart.Ssh Namespace > HostKeyEventArgs Class : HostKeyAlgorithm Property

Glossary Item Box

Gets the host key algorithm being used.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property HostKeyAlgorithm As String
Visual Basic (Usage) Copy Code
Dim instance As HostKeyEventArgs
Dim value As String

value = instance.HostKeyAlgorithm
C#
public string HostKeyAlgorithm {get;}
Managed Extensions for C++
public: __property string* get_HostKeyAlgorithm();
C++/CLI
public:
property String^ HostKeyAlgorithm {
   String^ get();
}

See Also

Reference

HostKeyEventArgs Class
HostKeyEventArgs Members


Verified Property

[image]
PowerTCP SSH and SFTP for .NET
Verified Property
See Also Send comments on this topic
Dart.Ssh Namespace > HostKeyEventArgs Class : Verified Property

Glossary Item Box

Gets and sets a value that indicates the application has verified the host key.

Syntax

Visual Basic (Declaration)
Public Property Verified As Boolean
Visual Basic (Usage) Copy Code
Dim instance As HostKeyEventArgs
Dim value As Boolean

instance.Verified = value

value = instance.Verified
C#
public bool Verified {get; set;}
Managed Extensions for C++
public: __property bool get_Verified();
public: __property void set_Verified(
   bool value
);
C++/CLI
public:
property bool Verified {
   bool get();
   void set (    bool value);
}

Remarks

This property defaults to false. If you do not set this to true, then the connection establishment stops and an IOException is thrown.

See Also

Reference

HostKeyEventArgs Class
HostKeyEventArgs Members


HttpProxyData Class

[image]
PowerTCP SSH and SFTP for .NET
HttpProxyData Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : HttpProxyData Class

Glossary Item Box

The required data for connecting through an HTTP proxy.

Object Model

HttpProxyData Class

Syntax

Visual Basic (Declaration)
<SerializableAttribute()>
Public Class HttpProxyData
   Inherits LoginData
Visual Basic (Usage) Copy Code
Dim instance As HttpProxyData
C#
[Serializable()]
public class HttpProxyData : LoginData
Managed Extensions for C++
[Serializable()]
public __gc class HttpProxyData : public LoginData
C++/CLI
[Serializable()]
public ref class HttpProxyData : public LoginData

Inheritance Hierarchy

System.Object
Dart.Ssh.LoginData
Dart.Ssh.HttpProxyData

See Also

Reference

HttpProxyData Members
Dart.Ssh Namespace
Proxy Property


HttpProxyData Class Members

[image]
PowerTCP SSH and SFTP for .NET
HttpProxyData Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : HttpProxyData Class

Glossary Item Box

The following tables list the members exposed by HttpProxyData.

Public Constructors

 | Name | Description
Public Constructor | HttpProxyData Constructor | Overloaded.
Top

Public Properties

 | Name | Description
Public Property | HostNameOrAddress | The hostname or address in dot notation. (Inherited from Dart.Ssh.LoginData)
Public Property | Password | The password for basic authentication. (Inherited from Dart.Ssh.LoginData)
Public Property | Port | The port. (Inherited from Dart.Ssh.LoginData)
Public Property | RequestHeaderLines | An array of additional request header lines (without end-of-line markers) to be sent to the server. May be null.
Public Property | Username | The username for basic authentication (null if no authentication is needed). (Inherited from Dart.Ssh.LoginData)
Top

See Also

Reference

HttpProxyData Class
Dart.Ssh Namespace
Proxy Property


HttpProxyData Constructor

[image]
PowerTCP SSH and SFTP for .NET
HttpProxyData Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > HttpProxyData Class : HttpProxyData Constructor

Glossary Item Box

Overload List

Overload | Description
HttpProxyData Constructor() | Provides SSH proxy information used to initialize the SshConnection.Proxy property.
HttpProxyData Constructor(String,Int32) | Connection data for an HTTP proxy.
HttpProxyData Constructor(String,Int32,String,String) | Connection data for an HTTP proxy.
HttpProxyData Constructor(String,Int32,String,String,String[]) | Connection data for an HTTP proxy.

See Also

Reference

HttpProxyData Class
HttpProxyData Members


HttpProxyData Constructor()

[image]
PowerTCP SSH and SFTP for .NET
HttpProxyData Constructor()
See Also Send comments on this topic
Dart.Ssh Namespace > HttpProxyData Class > HttpProxyData Constructor : HttpProxyData Constructor()

Glossary Item Box

Provides SSH proxy information used to initialize the SshConnection.Proxy property.

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As New HttpProxyData()
C#
public HttpProxyData()
Managed Extensions for C++
public: HttpProxyData();
C++/CLI
public:
HttpProxyData();

See Also

Reference

HttpProxyData Class
HttpProxyData Members
Overload List


HttpProxyData Constructor(String,Int32)

[image]
PowerTCP SSH and SFTP for .NET
HttpProxyData Constructor(String,Int32)
See Also Send comments on this topic
Dart.Ssh Namespace > HttpProxyData Class > HttpProxyData Constructor : HttpProxyData Constructor(String,Int32)

hostNameOrAddress
Proxy hostname
port
Proxy port

Glossary Item Box

Connection data for an HTTP proxy.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal hostNameOrAddress As String, _
   ByVal port As Integer _
)
Visual Basic (Usage) Copy Code
Dim hostNameOrAddress As String
Dim port As Integer

Dim instance As New HttpProxyData(hostNameOrAddress, port)
C#
public HttpProxyData(
   string hostNameOrAddress,
   int port
)
Managed Extensions for C++
public: HttpProxyData(
   string* hostNameOrAddress,
   int port
)
C++/CLI
public:
HttpProxyData(
   String^ hostNameOrAddress,
   int port
)

Parameters

hostNameOrAddress
Proxy hostname
port
Proxy port

Remarks

Equivalent to HttpProxyData(proxyHost, proxyPort, null, null, null).

See Also

Reference

HttpProxyData Class
HttpProxyData Members
Overload List
HttpProxyData Constructor(String,Int32,String,String,String[])


HttpProxyData Constructor(String,Int32,String,String)

[image]
PowerTCP SSH and SFTP for .NET
HttpProxyData Constructor(String,Int32,String,String)
See Also Send comments on this topic
Dart.Ssh Namespace > HttpProxyData Class > HttpProxyData Constructor : HttpProxyData Constructor(String,Int32,String,String)

hostNameOrAddress
Proxy hostname
port
Proxy port
username
Username for basic authentication (null if no authentication is needed)
password
Password for basic authentication (null if no authentication is needed)

Glossary Item Box

Connection data for an HTTP proxy.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal hostNameOrAddress As String, _
   ByVal port As Integer, _
   ByVal username As String, _
   ByVal password As String _
)
Visual Basic (Usage) Copy Code
Dim hostNameOrAddress As String
Dim port As Integer
Dim username As String
Dim password As String

Dim instance As New HttpProxyData(hostNameOrAddress, port, username, password)
C#
public HttpProxyData(
   string hostNameOrAddress,
   int port,
   string username,
   string password
)
Managed Extensions for C++
public: HttpProxyData(
   string* hostNameOrAddress,
   int port,
   string* username,
   string* password
)
C++/CLI
public:
HttpProxyData(
   String^ hostNameOrAddress,
   int port,
   String^ username,
   String^ password
)

Parameters

hostNameOrAddress
Proxy hostname
port
Proxy port
username
Username for basic authentication (null if no authentication is needed)
password
Password for basic authentication (null if no authentication is needed)

Remarks

Equivalent to HttpProxyData(proxyHost, proxyPort, proxyUser, proxyPass, null).

See Also

Reference

HttpProxyData Class
HttpProxyData Members
Overload List
HttpProxyData Constructor(String,Int32,String,String,String[])


HttpProxyData Constructor(String,Int32,String,String,String[])

[image]
PowerTCP SSH and SFTP for .NET
HttpProxyData Constructor(String,Int32,String,String,String[])
See Also Example Send comments on this topic
Dart.Ssh Namespace > HttpProxyData Class > HttpProxyData Constructor : HttpProxyData Constructor(String,Int32,String,String,String[])

hostNameOrAddress
Proxy hostname
port
Proxy port
username
Username for basic authentication (null if no authentication is needed)
password
Password for basic authentication (null if no authentication is needed)
requestHeaderLines
Additional request header lines to be sent to the server

Glossary Item Box

Connection data for an HTTP proxy.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal hostNameOrAddress As String, _
   ByVal port As Integer, _
   ByVal username As String, _
   ByVal password As String, _
   ByVal requestHeaderLines() As String _
)
Visual Basic (Usage) Copy Code
Dim hostNameOrAddress As String
Dim port As Integer
Dim username As String
Dim password As String
Dim requestHeaderLines() As String

Dim instance As New HttpProxyData(hostNameOrAddress, port, username, password, requestHeaderLines)
C#
public HttpProxyData(
   string hostNameOrAddress,
   int port,
   string username,
   string password,
   string[] requestHeaderLines
)
Managed Extensions for C++
public: HttpProxyData(
   string* hostNameOrAddress,
   int port,
   string* username,
   string* password,
   string*[]* requestHeaderLines
)
C++/CLI
public:
HttpProxyData(
   String^ hostNameOrAddress,
   int port,
   String^ username,
   String^ password,
   array<String^>^ requestHeaderLines
)

Parameters

hostNameOrAddress
Proxy hostname
port
Proxy port
username
Username for basic authentication (null if no authentication is needed)
password
Password for basic authentication (null if no authentication is needed)
requestHeaderLines
Additional request header lines to be sent to the server

Remarks

It is possible to specify a username and password if the proxy requires basic authentication. Also, additional request header lines can be specified (e.g., "User-Agent: CERN-LineMode/2.15 libwww/2.17b3").

Neither username nor password can be null to use basic authentication.

Example

C# Copy Code
new HttpProxyData("192.168.1.1", "3128", "proxyuser", "secret", new String[]
{"User-Agent: TrileadDerivedClient/1.0", "X-My-Proxy-Option: something"});

See Also

Reference

HttpProxyData Class
HttpProxyData Members
Overload List


HttpProxyData Class Properties

[image]
PowerTCP SSH and SFTP for .NET
HttpProxyData Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : HttpProxyData Class

Glossary Item Box

For a list of all members of this type, see HttpProxyData members.

Public Properties

 | Name | Description
Public Property | HostNameOrAddress | The hostname or address in dot notation. (Inherited from Dart.Ssh.LoginData)
Public Property | Password | The password for basic authentication. (Inherited from Dart.Ssh.LoginData)
Public Property | Port | The port. (Inherited from Dart.Ssh.LoginData)
Public Property | RequestHeaderLines | An array of additional request header lines (without end-of-line markers) to be sent to the server. May be null.
Public Property | Username | The username for basic authentication (null if no authentication is needed). (Inherited from Dart.Ssh.LoginData)
Top

See Also

Reference

HttpProxyData Class
Dart.Ssh Namespace
Proxy Property


RequestHeaderLines Property

[image]
PowerTCP SSH and SFTP for .NET
RequestHeaderLines Property
See Also Send comments on this topic
Dart.Ssh Namespace > HttpProxyData Class : RequestHeaderLines Property

Glossary Item Box

An array of additional request header lines (without end-of-line markers) to be sent to the server. May be null.

Syntax

Visual Basic (Declaration)
Public Property RequestHeaderLines As String()
Visual Basic (Usage) Copy Code
Dim instance As HttpProxyData
Dim value() As String

instance.RequestHeaderLines = value

value = instance.RequestHeaderLines
C#
public string[] RequestHeaderLines {get; set;}
Managed Extensions for C++
public: __property string*[]* get_RequestHeaderLines();
public: __property void set_RequestHeaderLines(
   string*[]* value
);
C++/CLI
public:
property array<String^>^ RequestHeaderLines {
   array<String^>^ get();
   void set (    array<String^>^ value);
}

See Also

Reference

HttpProxyData Class
HttpProxyData Members


HttpProxyException Class

[image]
PowerTCP SSH and SFTP for .NET
HttpProxyException Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : HttpProxyException Class

Glossary Item Box

May be thrown while establishing a connection through an HTTP proxy.

Object Model

HttpProxyException Class

Syntax

Visual Basic (Declaration)
Public Class HttpProxyException
   Inherits System.IO.IOException
Visual Basic (Usage) Copy Code
Dim instance As HttpProxyException
C#
public class HttpProxyException : System.IO.IOException
Managed Extensions for C++
public __gc class HttpProxyException : public System.IO.IOException
C++/CLI
public ref class HttpProxyException : public System.IO.IOException

Inheritance Hierarchy

System.Object
System.Exception
System.SystemException
System.IO.IOException
Dart.Ssh.HttpProxyException

See Also

Reference

HttpProxyException Members
Dart.Ssh Namespace
Proxy Property


HttpProxyException Class Members

[image]
PowerTCP SSH and SFTP for .NET
HttpProxyException Class Members
See Also Properties Methods Events Send comments on this topic
Dart.Ssh Namespace : HttpProxyException Class

Glossary Item Box

The following tables list the members exposed by HttpProxyException.

Public Properties

 | Name | Description
Public Property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from System.Exception)
Public Property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from System.Exception)
Public Property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from System.Exception)
Public Property | HttpErrorCode | The HTTP error code sent by the proxy.
Public Property | HttpResponse | The HTTP response sent by the proxy.
Public Property | InnerException | Gets the System.Exception instance that caused the current exception. (Inherited from System.Exception)
Public Property | Message | Gets a message that describes the current exception. (Inherited from System.Exception)
Public Property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from System.Exception)
Public Property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from System.Exception)
Public Property | TargetSite | Gets the method that throws the current exception. (Inherited from System.Exception)
Top

Public Methods

 | Name | Description
Public Method | GetBaseException | When overridden in a derived class, returns the System.Exception that is the root cause of one or more subsequent exceptions. (Inherited from System.Exception)
Public Method | GetObjectData | When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception. (Inherited from System.Exception)
Public Method | GetType | Gets the runtime type of the current instance. (Inherited from System.Exception)
Public Method | ToString | Creates and returns a string representation of the current exception. (Inherited from System.Exception)
Top

Protected Events

 | Name | Description
Protected Event | SerializeObjectState | Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Inherited from System.Exception)
Top

See Also

Reference

HttpProxyException Class
Dart.Ssh Namespace
Proxy Property


HttpProxyException Class Properties

[image]
PowerTCP SSH and SFTP for .NET
HttpProxyException Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : HttpProxyException Class

Glossary Item Box

For a list of all members of this type, see HttpProxyException members.

Public Properties

 | Name | Description
Public Property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from System.Exception)
Public Property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from System.Exception)
Public Property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from System.Exception)
Public Property | HttpErrorCode | The HTTP error code sent by the proxy.
Public Property | HttpResponse | The HTTP response sent by the proxy.
Public Property | InnerException | Gets the System.Exception instance that caused the current exception. (Inherited from System.Exception)
Public Property | Message | Gets a message that describes the current exception. (Inherited from System.Exception)
Public Property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from System.Exception)
Public Property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from System.Exception)
Public Property | TargetSite | Gets the method that throws the current exception. (Inherited from System.Exception)
Top

See Also

Reference

HttpProxyException Class
Dart.Ssh Namespace
Proxy Property


HttpErrorCode Property

[image]
PowerTCP SSH and SFTP for .NET
HttpErrorCode Property
See Also Send comments on this topic
Dart.Ssh Namespace > HttpProxyException Class : HttpErrorCode Property

Glossary Item Box

The HTTP error code sent by the proxy.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property HttpErrorCode As Integer
Visual Basic (Usage) Copy Code
Dim instance As HttpProxyException
Dim value As Integer

value = instance.HttpErrorCode
C#
public int HttpErrorCode {get;}
Managed Extensions for C++
public: __property int get_HttpErrorCode();
C++/CLI
public:
property int HttpErrorCode {
   int get();
}

See Also

Reference

HttpProxyException Class
HttpProxyException Members


HttpResponse Property

[image]
PowerTCP SSH and SFTP for .NET
HttpResponse Property
See Also Send comments on this topic
Dart.Ssh Namespace > HttpProxyException Class : HttpResponse Property

Glossary Item Box

The HTTP response sent by the proxy.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property HttpResponse As String
Visual Basic (Usage) Copy Code
Dim instance As HttpProxyException
Dim value As String

value = instance.HttpResponse
C#
public string HttpResponse {get;}
Managed Extensions for C++
public: __property string* get_HttpResponse();
C++/CLI
public:
property String^ HttpResponse {
   String^ get();
}

See Also

Reference

HttpProxyException Class
HttpProxyException Members


IPEndPoint Class

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : IPEndPoint Class

Glossary Item Box

Allows user to specify a range of IPEndPoints for local binding. Also resolves hostnames and saves them for future use.

Object Model

IPEndPoint Class

Syntax

Visual Basic (Declaration)
<SerializableAttribute()>
Public Class IPEndPoint
   Inherits System.Net.IPEndPoint
Visual Basic (Usage) Copy Code
Dim instance As IPEndPoint
C#
[Serializable()]
public class IPEndPoint : System.Net.IPEndPoint
Managed Extensions for C++
[Serializable()]
public __gc class IPEndPoint : public System.Net.IPEndPoint
C++/CLI
[Serializable()]
public ref class IPEndPoint : public System.Net.IPEndPoint

Inheritance Hierarchy

System.Object
System.Net.EndPoint
System.Net.IPEndPoint
Dart.Ssh.IPEndPoint

See Also

Reference

IPEndPoint Members
Dart.Ssh Namespace


IPEndPoint Class Members

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Class Members
See Also Fields Properties Methods Send comments on this topic
Dart.Ssh Namespace : IPEndPoint Class

Glossary Item Box

The following tables list the members exposed by IPEndPoint.

Public Constructors

 | Name | Description
Public Constructor | IPEndPoint Constructor | Overloaded.
Top

Public Fields

 | Name | Description
Public Field | Range | The socket will be bound to a port between IPEndPoint.Port and (IPEndPoint.Port + Range), inclusive.
Top

Public Properties

 | Name | Description
Public Property | Address | Gets or sets the address of the endpoint.
Public Property | AddressFamily | (Inherited from System.Net.IPEndPoint)
Public Property | HostNameOrAddress | Gets or sets the host name or address resolved to create this IPEndPoint. Also performs a DNS resolution.
Public Property | HostNameOrAddressColonPort | The host name or address used to create this IPEndPoint with ":port" appended.
Public Property | Port | Gets or sets the port number of the endpoint.
Top

Public Methods

 | Name | Description
Public Method | Create | (Inherited from System.Net.IPEndPoint)
Public Method | Equals | (Inherited from System.Net.IPEndPoint)
Public Method | GetHashCode | (Inherited from System.Net.IPEndPoint)
Public Method | Serialize | (Inherited from System.Net.IPEndPoint)
Public Method | ToString | (Inherited from System.Net.IPEndPoint)
Top

See Also

Reference

IPEndPoint Class
Dart.Ssh Namespace


IPEndPoint Constructor

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class : IPEndPoint Constructor

Glossary Item Box

Overload List

Overload | Description
IPEndPoint Constructor() | Creates an IPEndPoint using IPAddress.Any and an ephemeral port (0).
IPEndPoint Constructor(AddressFamily) | Creates an IPEndPoint using IPAddress.Any or IPAddress.IPv6Any and an ephemeral port (0).
IPEndPoint Constructor(IPAddress,Int32) | Creates an IPEndPoint using a specified IPAddress and port.
IPEndPoint Constructor(IPAddress,Int32,Int32) | Creates an IPEndPoint using an IPAddress, port, and port range.
IPEndPoint Constructor(String) | Creates an IPEndPoint using a hostname or address, and port 0.
IPEndPoint Constructor(String,Int32) | Creates an IPEndPoint using a hostname or address, and port.
IPEndPoint Constructor(String,AddressFamily,Int32) | Creates an IPEndPoint using a hostname or address, port, and AddressFamily.
IPEndPoint Constructor(String,AddressFamily,Int32,Int32) | Creates an IPEndPoint using a hostname or address, address family, port and range.
IPEndPoint Constructor(String,String,Int32,Int32) | Creates an IPEndPoint using a hostname or address, address, port and range.

See Also

Reference

IPEndPoint Class
IPEndPoint Members


IPEndPoint Constructor()

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Constructor()
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class > IPEndPoint Constructor : IPEndPoint Constructor()

Glossary Item Box

Creates an IPEndPoint using IPAddress.Any and an ephemeral port (0).

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As New IPEndPoint()
C#
public IPEndPoint()
Managed Extensions for C++
public: IPEndPoint();
C++/CLI
public:
IPEndPoint();

See Also

Reference

IPEndPoint Class
IPEndPoint Members
Overload List


IPEndPoint Constructor(AddressFamily)

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Constructor(AddressFamily)
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class > IPEndPoint Constructor : IPEndPoint Constructor(AddressFamily)

addressFamily
AddressFamily to match.

Glossary Item Box

Creates an IPEndPoint using IPAddress.Any or IPAddress.IPv6Any and an ephemeral port (0).

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal addressFamily As AddressFamily _
)
Visual Basic (Usage) Copy Code
Dim addressFamily As AddressFamily

Dim instance As New IPEndPoint(addressFamily)
C#
public IPEndPoint(
   AddressFamily addressFamily
)
Managed Extensions for C++
public: IPEndPoint(
   AddressFamily addressFamily
)
C++/CLI
public:
IPEndPoint(
   AddressFamily addressFamily
)

Parameters

addressFamily
AddressFamily to match.

See Also

Reference

IPEndPoint Class
IPEndPoint Members
Overload List


IPEndPoint Constructor(IPAddress,Int32)

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Constructor(IPAddress,Int32)
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class > IPEndPoint Constructor : IPEndPoint Constructor(IPAddress,Int32)

address
An IPv4 or IPv6 address.
port
The port to bind to.

Glossary Item Box

Creates an IPEndPoint using a specified IPAddress and port.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal address As IPAddress, _
   ByVal port As Integer _
)
Visual Basic (Usage) Copy Code
Dim address As IPAddress
Dim port As Integer

Dim instance As New IPEndPoint(address, port)
C#
public IPEndPoint(
   IPAddress address,
   int port
)
Managed Extensions for C++
public: IPEndPoint(
   IPAddress* address,
   int port
)
C++/CLI
public:
IPEndPoint(
   IPAddress^ address,
   int port
)

Parameters

address
An IPv4 or IPv6 address.
port
The port to bind to.

See Also

Reference

IPEndPoint Class
IPEndPoint Members
Overload List


IPEndPoint Constructor(IPAddress,Int32,Int32)

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Constructor(IPAddress,Int32,Int32)
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class > IPEndPoint Constructor : IPEndPoint Constructor(IPAddress,Int32,Int32)

address
An IPv4 or IPv6 address.
port
The port to bind to.
range
The range of ports, starting at port, to attempt to bind to.

Glossary Item Box

Creates an IPEndPoint using an IPAddress, port, and port range.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal address As IPAddress, _
   ByVal port As Integer, _
   ByVal range As Integer _
)
Visual Basic (Usage) Copy Code
Dim address As IPAddress
Dim port As Integer
Dim range As Integer

Dim instance As New IPEndPoint(address, port, range)
C#
public IPEndPoint(
   IPAddress address,
   int port,
   int range
)
Managed Extensions for C++
public: IPEndPoint(
   IPAddress* address,
   int port,
   int range
)
C++/CLI
public:
IPEndPoint(
   IPAddress^ address,
   int port,
   int range
)

Parameters

address
An IPv4 or IPv6 address.
port
The port to bind to.
range
The range of ports, starting at port, to attempt to bind to.

See Also

Reference

IPEndPoint Class
IPEndPoint Members
Overload List


IPEndPoint Constructor(String)

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Constructor(String)
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class > IPEndPoint Constructor : IPEndPoint Constructor(String)

hostNameOrAddress
A hostname or an IPv4 or IPv6 address. Empty string resolves to the first local IPv4 network interface.

Glossary Item Box

Creates an IPEndPoint using a hostname or address, and port 0.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal hostNameOrAddress As String _
)
Visual Basic (Usage) Copy Code
Dim hostNameOrAddress As String

Dim instance As New IPEndPoint(hostNameOrAddress)
C#
public IPEndPoint(
   string hostNameOrAddress
)
Managed Extensions for C++
public: IPEndPoint(
   string* hostNameOrAddress
)
C++/CLI
public:
IPEndPoint(
   String^ hostNameOrAddress
)

Parameters

hostNameOrAddress
A hostname or an IPv4 or IPv6 address. Empty string resolves to the first local IPv4 network interface.

Remarks

The hostNameOrAddress parameter is limited to 126 characters in pre-4.0 versions of the .NET Framework, and 255 characters in versions 4.0 and higher.

If hostNameOrAddress is a hostname, resolves to the IPv4 address.

See Also

Reference

IPEndPoint Class
IPEndPoint Members
Overload List


IPEndPoint Constructor(String,Int32)

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Constructor(String,Int32)
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class > IPEndPoint Constructor : IPEndPoint Constructor(String,Int32)

hostNameOrAddress
A hostname or an IPv4 or IPv6 address. Empty string resolves to the first local IPv4 network interface.
port
The port to bind to.

Glossary Item Box

Creates an IPEndPoint using a hostname or address, and port.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal hostNameOrAddress As String, _
   ByVal port As Integer _
)
Visual Basic (Usage) Copy Code
Dim hostNameOrAddress As String
Dim port As Integer

Dim instance As New IPEndPoint(hostNameOrAddress, port)
C#
public IPEndPoint(
   string hostNameOrAddress,
   int port
)
Managed Extensions for C++
public: IPEndPoint(
   string* hostNameOrAddress,
   int port
)
C++/CLI
public:
IPEndPoint(
   String^ hostNameOrAddress,
   int port
)

Parameters

hostNameOrAddress
A hostname or an IPv4 or IPv6 address. Empty string resolves to the first local IPv4 network interface.
port
The port to bind to.

Remarks

The hostNameOrAddress parameter is limited to 126 characters in pre-4.0 versions of the .NET Framework, and 255 characters in versions 4.0 and higher.

If hostNameOrAddress is a hostname, resolves to the IPv4 address.

See Also

Reference

IPEndPoint Class
IPEndPoint Members
Overload List


IPEndPoint Constructor(String,AddressFamily,Int32)

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Constructor(String,AddressFamily,Int32)
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class > IPEndPoint Constructor : IPEndPoint Constructor(String,AddressFamily,Int32)

hostNameOrAddress
A hostname or string address. Empty string resolves to the first local network interface in the specified AddressFamily.
addressFamily
The System.Net.Sockets.AddressFamily to match if resolving a hostname.
port
The port to bind to.

Glossary Item Box

Creates an IPEndPoint using a hostname or address, port, and AddressFamily.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal hostNameOrAddress As String, _
   ByVal addressFamily As AddressFamily, _
   ByVal port As Integer _
)
Visual Basic (Usage) Copy Code
Dim hostNameOrAddress As String
Dim addressFamily As AddressFamily
Dim port As Integer

Dim instance As New IPEndPoint(hostNameOrAddress, addressFamily, port)
C#
public IPEndPoint(
   string hostNameOrAddress,
   AddressFamily addressFamily,
   int port
)
Managed Extensions for C++
public: IPEndPoint(
   string* hostNameOrAddress,
   AddressFamily addressFamily,
   int port
)
C++/CLI
public:
IPEndPoint(
   String^ hostNameOrAddress,
   AddressFamily addressFamily,
   int port
)

Parameters

hostNameOrAddress
A hostname or string address. Empty string resolves to the first local network interface in the specified AddressFamily.
addressFamily
The System.Net.Sockets.AddressFamily to match if resolving a hostname.
port
The port to bind to.

Remarks

The hostNameOrAddress parameter is limited to 126 characters in pre-4.0 versions of the .NET Framework, and 255 characters in versions 4.0 and higher.

See Also

Reference

IPEndPoint Class
IPEndPoint Members
Overload List


IPEndPoint Constructor(String,AddressFamily,Int32,Int32)

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Constructor(String,AddressFamily,Int32,Int32)
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class > IPEndPoint Constructor : IPEndPoint Constructor(String,AddressFamily,Int32,Int32)

hostNameOrAddress
A hostname or string address. Empty string resolves to the first local network interface in the specified AddressFamily.
addressFamily
The AddressFamily to match if resolving a hostname.
port
The port to bind to.
range
The range of ports, starting at port, to attempt to bind to.

Glossary Item Box

Creates an IPEndPoint using a hostname or address, address family, port and range.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal hostNameOrAddress As String, _
   ByVal addressFamily As AddressFamily, _
   ByVal port As Integer, _
   ByVal range As Integer _
)
Visual Basic (Usage) Copy Code
Dim hostNameOrAddress As String
Dim addressFamily As AddressFamily
Dim port As Integer
Dim range As Integer

Dim instance As New IPEndPoint(hostNameOrAddress, addressFamily, port, range)
C#
public IPEndPoint(
   string hostNameOrAddress,
   AddressFamily addressFamily,
   int port,
   int range
)
Managed Extensions for C++
public: IPEndPoint(
   string* hostNameOrAddress,
   AddressFamily addressFamily,
   int port,
   int range
)
C++/CLI
public:
IPEndPoint(
   String^ hostNameOrAddress,
   AddressFamily addressFamily,
   int port,
   int range
)

Parameters

hostNameOrAddress
A hostname or string address. Empty string resolves to the first local network interface in the specified AddressFamily.
addressFamily
The AddressFamily to match if resolving a hostname.
port
The port to bind to.
range
The range of ports, starting at port, to attempt to bind to.

Remarks

The socket will try to bind to the specified port. Upon failure, it will try with each successive port up to (port + range), until successful. An Exception is raised if all binding attempts fail.

The hostNameOrAddress parameter is limited to 126 characters in pre-4.0 versions of the .NET Framework, and 255 characters in versions 4.0 and higher.

See Also

Reference

IPEndPoint Class
IPEndPoint Members
Overload List


IPEndPoint Constructor(String,String,Int32,Int32)

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Constructor(String,String,Int32,Int32)
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class > IPEndPoint Constructor : IPEndPoint Constructor(String,String,Int32,Int32)

hostNameOrAddress
A hostname or string address.
address
The IPAddress in string notation.
port
The port to bind to.
range
The range of ports, starting at port, to attempt to bind to.

Glossary Item Box

Creates an IPEndPoint using a hostname or address, address, port and range.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal hostNameOrAddress As String, _
   ByVal address As String, _
   ByVal port As Integer, _
   ByVal range As Integer _
)
Visual Basic (Usage) Copy Code
Dim hostNameOrAddress As String
Dim address As String
Dim port As Integer
Dim range As Integer

Dim instance As New IPEndPoint(hostNameOrAddress, address, port, range)
C#
public IPEndPoint(
   string hostNameOrAddress,
   string address,
   int port,
   int range
)
Managed Extensions for C++
public: IPEndPoint(
   string* hostNameOrAddress,
   string* address,
   int port,
   int range
)
C++/CLI
public:
IPEndPoint(
   String^ hostNameOrAddress,
   String^ address,
   int port,
   int range
)

Parameters

hostNameOrAddress
A hostname or string address.
address
The IPAddress in string notation.
port
The port to bind to.
range
The range of ports, starting at port, to attempt to bind to.

Remarks

This constructor is typically used to serialize the IPEndPoint and does not resolve hostNameOrAddress. The hostname can be needed for some proxies.

See Also

Reference

IPEndPoint Class
IPEndPoint Members
Overload List


IPEndPoint Class Properties

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : IPEndPoint Class

Glossary Item Box

For a list of all members of this type, see IPEndPoint members.

Public Properties

 | Name | Description
Public Property | Address | Gets or sets the address of the endpoint.
Public Property | AddressFamily | (Inherited from System.Net.IPEndPoint)
Public Property | HostNameOrAddress | Gets or sets the host name or address resolved to create this IPEndPoint. Also performs a DNS resolution.
Public Property | HostNameOrAddressColonPort | The host name or address used to create this IPEndPoint with ":port" appended.
Public Property | Port | Gets or sets the port number of the endpoint.
Top

See Also

Reference

IPEndPoint Class
Dart.Ssh Namespace


Address Property

[image]
PowerTCP SSH and SFTP for .NET
Address Property
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class : Address Property

Glossary Item Box

Gets or sets the address of the endpoint.

Syntax

Visual Basic (Declaration)
Public Shadows Property Address As IPAddress
Visual Basic (Usage) Copy Code
Dim instance As IPEndPoint
Dim value As IPAddress

instance.Address = value

value = instance.Address
C#
public new IPAddress Address {get; set;}
Managed Extensions for C++
public: __property new IPAddress* get_Address();
public: __property new void set_Address(
   IPAddress* value
);
C++/CLI
public:
new property IPAddress^ Address {
   IPAddress^ get();
   void set (    IPAddress^ value);
}

See Also

Reference

IPEndPoint Class
IPEndPoint Members


HostNameOrAddress Property

[image]
PowerTCP SSH and SFTP for .NET
HostNameOrAddress Property
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class : HostNameOrAddress Property

Glossary Item Box

Gets or sets the host name or address resolved to create this IPEndPoint. Also performs a DNS resolution.

Syntax

Visual Basic (Declaration)
Public Property HostNameOrAddress As String
Visual Basic (Usage) Copy Code
Dim instance As IPEndPoint
Dim value As String

instance.HostNameOrAddress = value

value = instance.HostNameOrAddress
C#
public string HostNameOrAddress {get; set;}
Managed Extensions for C++
public: __property string* get_HostNameOrAddress();
public: __property void set_HostNameOrAddress(
   string* value
);
C++/CLI
public:
property String^ HostNameOrAddress {
   String^ get();
   void set (    String^ value);
}

Remarks

The value of this property is limited to 126 characters in pre-4.0 versions of the .NET Framework, and 255 characters in versions 4.0 and higher. IDN encoding is performed for DNS resolution if a non-ASCII hostname is provided.

See Also

Reference

IPEndPoint Class
IPEndPoint Members


HostNameOrAddressColonPort Property

[image]
PowerTCP SSH and SFTP for .NET
HostNameOrAddressColonPort Property
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class : HostNameOrAddressColonPort Property

Glossary Item Box

The host name or address used to create this IPEndPoint with ":port" appended.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property HostNameOrAddressColonPort As String
Visual Basic (Usage) Copy Code
Dim instance As IPEndPoint
Dim value As String

value = instance.HostNameOrAddressColonPort
C#
public string HostNameOrAddressColonPort {get;}
Managed Extensions for C++
public: __property string* get_HostNameOrAddressColonPort();
C++/CLI
public:
property String^ HostNameOrAddressColonPort {
   String^ get();
}

Remarks

If HostNameOrAddress is an IPv6 address, the format includes square brackets as follows: [xx:yy...zz]:port.

See Also

Reference

IPEndPoint Class
IPEndPoint Members


Port Property

[image]
PowerTCP SSH and SFTP for .NET
Port Property
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class : Port Property

Glossary Item Box

Gets or sets the port number of the endpoint.

Syntax

Visual Basic (Declaration)
<DefaultValueAttribute()>
Public Shadows Property Port As Integer
Visual Basic (Usage) Copy Code
Dim instance As IPEndPoint
Dim value As Integer

instance.Port = value

value = instance.Port
C#
[DefaultValue()]
public new int Port {get; set;}
Managed Extensions for C++
[DefaultValue()]
public: __property new int get_Port();
public: __property new void set_Port(
   int value
);
C++/CLI
[DefaultValue()]
public:
new property int Port {
   int get();
   void set (    int value);
}

See Also

Reference

IPEndPoint Class
IPEndPoint Members


IPEndPoint Class Fields

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Class Fields
See Also Send comments on this topic
Dart.Ssh Namespace : IPEndPoint Class

Glossary Item Box

For a list of all members of this type, see IPEndPoint members.

Public Fields

 | Name | Description
Public Field | Range | The socket will be bound to a port between IPEndPoint.Port and (IPEndPoint.Port + Range), inclusive.
Top

See Also

Reference

IPEndPoint Class
Dart.Ssh Namespace


Range Field

[image]
PowerTCP SSH and SFTP for .NET
Range Field
See Also Send comments on this topic
Dart.Ssh Namespace > IPEndPoint Class : Range Field

Glossary Item Box

The socket will be bound to a port between IPEndPoint.Port and (IPEndPoint.Port + Range), inclusive.

Syntax

Visual Basic (Declaration)
Public Range As Integer
Visual Basic (Usage) Copy Code
Dim instance As IPEndPoint
Dim value As Integer

value = instance.Range

instance.Range = value
C#
public int Range
Managed Extensions for C++
public: int Range
C++/CLI
public:
int Range

See Also

Reference

IPEndPoint Class
IPEndPoint Members


ListEntry Class

[image]
PowerTCP SSH and SFTP for .NET
ListEntry Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : ListEntry Class

Glossary Item Box

A ListEntry returned by Sftp.List.

Object Model

ListEntry ClassSftpFileAttributes Class

Syntax

Visual Basic (Declaration)
Public Class ListEntry
Visual Basic (Usage) Copy Code
Dim instance As ListEntry
C#
public class ListEntry
Managed Extensions for C++
public __gc class ListEntry
C++/CLI
public ref class ListEntry

Inheritance Hierarchy

System.Object
Dart.Ssh.ListEntry

See Also

Reference

ListEntry Members
Dart.Ssh Namespace


ListEntry Class Members

[image]
PowerTCP SSH and SFTP for .NET
ListEntry Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : ListEntry Class

Glossary Item Box

The following tables list the members exposed by ListEntry.

Public Constructors

 | Name | Description
Public Constructor | ListEntry Constructor | ListEntry constructor.
Top

Public Properties

 | Name | Description
Public Property | Attributes | The entry attributes.
Public Property | FileName | A relative name within the directory.
Public Property | LongEntry | An expanded filename format, similar to what is returned by "ls -l" on Unix systems.
Public Property | Path | The absolute path location of the entry.
Top

See Also

Reference

ListEntry Class
Dart.Ssh Namespace


ListEntry Constructor

[image]
PowerTCP SSH and SFTP for .NET
ListEntry Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > ListEntry Class : ListEntry Constructor

path
Absolute path of the file or directory
longEntry
Long entry as provided by the server
attributes
File attributes

Glossary Item Box

ListEntry constructor.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal path As String, _
   ByVal longEntry As String, _
   ByVal attributes As SftpFileAttributes _
)
Visual Basic (Usage) Copy Code
Dim path As String
Dim longEntry As String
Dim attributes As SftpFileAttributes

Dim instance As New ListEntry(path, longEntry, attributes)
C#
public ListEntry(
   string path,
   string longEntry,
   SftpFileAttributes attributes
)
Managed Extensions for C++
public: ListEntry(
   string* path,
   string* longEntry,
   SftpFileAttributes* attributes
)
C++/CLI
public:
ListEntry(
   String^ path,
   String^ longEntry,
   SftpFileAttributes^ attributes
)

Parameters

path
Absolute path of the file or directory
longEntry
Long entry as provided by the server
attributes
File attributes

See Also

Reference

ListEntry Class
ListEntry Members


ListEntry Class Properties

[image]
PowerTCP SSH and SFTP for .NET
ListEntry Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : ListEntry Class

Glossary Item Box

For a list of all members of this type, see ListEntry members.

Public Properties

 | Name | Description
Public Property | Attributes | The entry attributes.
Public Property | FileName | A relative name within the directory.
Public Property | LongEntry | An expanded filename format, similar to what is returned by "ls -l" on Unix systems.
Public Property | Path | The absolute path location of the entry.
Top

See Also

Reference

ListEntry Class
Dart.Ssh Namespace


Attributes Property

[image]
PowerTCP SSH and SFTP for .NET
Attributes Property
See Also Send comments on this topic
Dart.Ssh Namespace > ListEntry Class : Attributes Property

Glossary Item Box

The entry attributes.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Attributes As SftpFileAttributes
Visual Basic (Usage) Copy Code
Dim instance As ListEntry
Dim value As SftpFileAttributes

value = instance.Attributes
C#
public SftpFileAttributes Attributes {get;}
Managed Extensions for C++
public: __property SftpFileAttributes* get_Attributes();
C++/CLI
public:
property SftpFileAttributes^ Attributes {
   SftpFileAttributes^ get();
}

See Also

Reference

ListEntry Class
ListEntry Members


FileName Property

[image]
PowerTCP SSH and SFTP for .NET
FileName Property
See Also Send comments on this topic
Dart.Ssh Namespace > ListEntry Class : FileName Property

Glossary Item Box

A relative name within the directory.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property FileName As String
Visual Basic (Usage) Copy Code
Dim instance As ListEntry
Dim value As String

value = instance.FileName
C#
public string FileName {get;}
Managed Extensions for C++
public: __property string* get_FileName();
C++/CLI
public:
property String^ FileName {
   String^ get();
}

See Also

Reference

ListEntry Class
ListEntry Members


LongEntry Property

[image]
PowerTCP SSH and SFTP for .NET
LongEntry Property
See Also Example Send comments on this topic
Dart.Ssh Namespace > ListEntry Class : LongEntry Property

Glossary Item Box

An expanded filename format, similar to what is returned by "ls -l" on Unix systems.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property LongEntry As String
Visual Basic (Usage) Copy Code
Dim instance As ListEntry
Dim value As String

value = instance.LongEntry
C#
public string LongEntry {get;}
Managed Extensions for C++
public: __property string* get_LongEntry();
C++/CLI
public:
property String^ LongEntry {
   String^ get();
}

Remarks

The format of this field is unspecified by the SFTP v3 protocol. It must be suitable for use in the output of a directory listing command (the recommended operation for a directory listing command is to display this data). However, clients should not attempt to parse the longname field for file attributes; the attrs field should be used instead.

Example

The recommended format for the longname field:
C# Copy Code
-rwxr-xr-x   1 mjos     staff      348911 Mar 25 14:29 t-filexfer

See Also

Reference

ListEntry Class
ListEntry Members


Path Property

[image]
PowerTCP SSH and SFTP for .NET
Path Property
See Also Send comments on this topic
Dart.Ssh Namespace > ListEntry Class : Path Property

Glossary Item Box

The absolute path location of the entry.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Path As String
Visual Basic (Usage) Copy Code
Dim instance As ListEntry
Dim value As String

value = instance.Path
C#
public string Path {get;}
Managed Extensions for C++
public: __property string* get_Path();
C++/CLI
public:
property String^ Path {
   String^ get();
}

See Also

Reference

ListEntry Class
ListEntry Members


ListProgress Class

[image]
PowerTCP SSH and SFTP for .NET
ListProgress Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : ListProgress Class

Glossary Item Box

Provides progress information during a copy operation for a list of files and folders

Object Model

ListProgress Class

Syntax

Visual Basic (Declaration)
Public Class ListProgress
Visual Basic (Usage) Copy Code
Dim instance As ListProgress
C#
public class ListProgress
Managed Extensions for C++
public __gc class ListProgress
C++/CLI
public ref class ListProgress

Inheritance Hierarchy

System.Object
Dart.Ssh.ListProgress

See Also

Reference

ListProgress Members
Dart.Ssh Namespace


ListProgress Class Members

[image]
PowerTCP SSH and SFTP for .NET
ListProgress Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : ListProgress Class

Glossary Item Box

The following tables list the members exposed by ListProgress.

Public Properties

 | Name | Description
Public Property | BytesCopied | Gets the total number of bytes transferred for the entire copy operation.
Public Property | BytesCopiedEx | Gets the total number of bytes transferred for the copy operation as a float.
Public Property | Count | Total number of folders + files to be transferred.
Public Property | Index | Index of folder or file in the transfer list.
Public Property | Percentage | Gets the percentage (0-100) of bytes copied in the entire copy operation.
Public Property | TotalBytes | Gets the aggregated number of bytes for the entire copy operation.
Public Property | TotalBytesEx | Gets the total number of bytes for the entire copy operation as a float.
Top

See Also

Reference

ListProgress Class
Dart.Ssh Namespace


ListProgress Class Properties

[image]
PowerTCP SSH and SFTP for .NET
ListProgress Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : ListProgress Class

Glossary Item Box

For a list of all members of this type, see ListProgress members.

Public Properties

 | Name | Description
Public Property | BytesCopied | Gets the total number of bytes transferred for the entire copy operation.
Public Property | BytesCopiedEx | Gets the total number of bytes transferred for the copy operation as a float.
Public Property | Count | Total number of folders + files to be transferred.
Public Property | Index | Index of folder or file in the transfer list.
Public Property | Percentage | Gets the percentage (0-100) of bytes copied in the entire copy operation.
Public Property | TotalBytes | Gets the aggregated number of bytes for the entire copy operation.
Public Property | TotalBytesEx | Gets the total number of bytes for the entire copy operation as a float.
Top

See Also

Reference

ListProgress Class
Dart.Ssh Namespace


BytesCopied Property

[image]
PowerTCP SSH and SFTP for .NET
BytesCopied Property
See Also Send comments on this topic
Dart.Ssh Namespace > ListProgress Class : BytesCopied Property

Glossary Item Box

Gets the total number of bytes transferred for the entire copy operation.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property BytesCopied As Long
Visual Basic (Usage) Copy Code
Dim instance As ListProgress
Dim value As Long

value = instance.BytesCopied
C#
public long BytesCopied {get;}
Managed Extensions for C++
public: __property long get_BytesCopied();
C++/CLI
public:
property int64 BytesCopied {
   int64 get();
}

See Also

Reference

ListProgress Class
ListProgress Members


BytesCopiedEx Property

[image]
PowerTCP SSH and SFTP for .NET
BytesCopiedEx Property
See Also Send comments on this topic
Dart.Ssh Namespace > ListProgress Class : BytesCopiedEx Property

Glossary Item Box

Gets the total number of bytes transferred for the copy operation as a float.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property BytesCopiedEx As Single
Visual Basic (Usage) Copy Code
Dim instance As ListProgress
Dim value As Single

value = instance.BytesCopiedEx
C#
public float BytesCopiedEx {get;}
Managed Extensions for C++
public: __property float get_BytesCopiedEx();
C++/CLI
public:
property float BytesCopiedEx {
   float get();
}

See Also

Reference

ListProgress Class
ListProgress Members


Count Property

[image]
PowerTCP SSH and SFTP for .NET
Count Property
See Also Send comments on this topic
Dart.Ssh Namespace > ListProgress Class : Count Property

Glossary Item Box

Total number of folders + files to be transferred.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Count As Integer
Visual Basic (Usage) Copy Code
Dim instance As ListProgress
Dim value As Integer

value = instance.Count
C#
public int Count {get;}
Managed Extensions for C++
public: __property int get_Count();
C++/CLI
public:
property int Count {
   int get();
}

See Also

Reference

ListProgress Class
ListProgress Members


Index Property

[image]
PowerTCP SSH and SFTP for .NET
Index Property
See Also Send comments on this topic
Dart.Ssh Namespace > ListProgress Class : Index Property

Glossary Item Box

Index of folder or file in the transfer list.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Index As Integer
Visual Basic (Usage) Copy Code
Dim instance As ListProgress
Dim value As Integer

value = instance.Index
C#
public int Index {get;}
Managed Extensions for C++
public: __property int get_Index();
C++/CLI
public:
property int Index {
   int get();
}

See Also

Reference

ListProgress Class
ListProgress Members


Percentage Property

[image]
PowerTCP SSH and SFTP for .NET
Percentage Property
See Also Send comments on this topic
Dart.Ssh Namespace > ListProgress Class : Percentage Property

Glossary Item Box

Gets the percentage (0-100) of bytes copied in the entire copy operation.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Percentage As Integer
Visual Basic (Usage) Copy Code
Dim instance As ListProgress
Dim value As Integer

value = instance.Percentage
C#
public int Percentage {get;}
Managed Extensions for C++
public: __property int get_Percentage();
C++/CLI
public:
property int Percentage {
   int get();
}

See Also

Reference

ListProgress Class
ListProgress Members


TotalBytes Property

[image]
PowerTCP SSH and SFTP for .NET
TotalBytes Property
See Also Send comments on this topic
Dart.Ssh Namespace > ListProgress Class : TotalBytes Property

Glossary Item Box

Gets the aggregated number of bytes for the entire copy operation.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property TotalBytes As Long
Visual Basic (Usage) Copy Code
Dim instance As ListProgress
Dim value As Long

value = instance.TotalBytes
C#
public long TotalBytes {get;}
Managed Extensions for C++
public: __property long get_TotalBytes();
C++/CLI
public:
property int64 TotalBytes {
   int64 get();
}

See Also

Reference

ListProgress Class
ListProgress Members


TotalBytesEx Property

[image]
PowerTCP SSH and SFTP for .NET
TotalBytesEx Property
See Also Send comments on this topic
Dart.Ssh Namespace > ListProgress Class : TotalBytesEx Property

Glossary Item Box

Gets the total number of bytes for the entire copy operation as a float.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property TotalBytesEx As Single
Visual Basic (Usage) Copy Code
Dim instance As ListProgress
Dim value As Single

value = instance.TotalBytesEx
C#
public float TotalBytesEx {get;}
Managed Extensions for C++
public: __property float get_TotalBytesEx();
C++/CLI
public:
property float TotalBytesEx {
   float get();
}

See Also

Reference

ListProgress Class
ListProgress Members


LocalPortForwarder Class

[image]
PowerTCP SSH and SFTP for .NET
LocalPortForwarder Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : LocalPortForwarder Class

Glossary Item Box

Forwards TCP/IP connections to a local port via the secure tunnel to another host.

Object Model

LocalPortForwarder Class

Syntax

Visual Basic (Declaration)
Public Class LocalPortForwarder
Visual Basic (Usage) Copy Code
Dim instance As LocalPortForwarder
C#
public class LocalPortForwarder
Managed Extensions for C++
public __gc class LocalPortForwarder
C++/CLI
public ref class LocalPortForwarder

Remarks

The remote host may or may not be identical to the remote SSH-2 server. See Connection.CreateLocalPortForwarder for creation information.

Inheritance Hierarchy

System.Object
Dart.Ssh.LocalPortForwarder

See Also

Reference

LocalPortForwarder Members
Dart.Ssh Namespace


LocalPortForwarder Class Members

[image]
PowerTCP SSH and SFTP for .NET
LocalPortForwarder Class Members
See Also Methods Send comments on this topic
Dart.Ssh Namespace : LocalPortForwarder Class

Glossary Item Box

The following tables list the members exposed by LocalPortForwarder.

Public Methods

 | Name | Description
Public Method | Close | Stops TCP/IP forwarding of newly arriving connections.
Top

See Also

Reference

LocalPortForwarder Class
Dart.Ssh Namespace


LocalPortForwarder Class Methods

[image]
PowerTCP SSH and SFTP for .NET
LocalPortForwarder Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : LocalPortForwarder Class

Glossary Item Box

For a list of all members of this type, see LocalPortForwarder members.

Public Methods

 | Name | Description
Public Method | Close | Stops TCP/IP forwarding of newly arriving connections.
Top

See Also

Reference

LocalPortForwarder Class
Dart.Ssh Namespace


Close Method

[image]
PowerTCP SSH and SFTP for .NET
Close Method
See Also Send comments on this topic
Dart.Ssh Namespace > LocalPortForwarder Class : Close Method

Glossary Item Box

Stops TCP/IP forwarding of newly arriving connections.

Syntax

Visual Basic (Declaration)
Public Sub Close()
Visual Basic (Usage) Copy Code
Dim instance As LocalPortForwarder

instance.Close()
C#
public void Close()
Managed Extensions for C++
public: void Close();
C++/CLI
public:
void Close();

See Also

Reference

LocalPortForwarder Class
LocalPortForwarder Members


LogEventArgs Class

[image]
PowerTCP SSH and SFTP for .NET
LogEventArgs Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : LogEventArgs Class

Glossary Item Box

Provides data for the SshConnection.Log event.

Object Model

LogEventArgs ClassPacket Class

Syntax

Visual Basic (Declaration)
Public Class LogEventArgs
   Inherits BaseEventArgs
Visual Basic (Usage) Copy Code
Dim instance As LogEventArgs
C#
public class LogEventArgs : BaseEventArgs
Managed Extensions for C++
public __gc class LogEventArgs : public BaseEventArgs
C++/CLI
public ref class LogEventArgs : public BaseEventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
Dart.Ssh.BaseEventArgs
Dart.Ssh.LogEventArgs

See Also

Reference

LogEventArgs Members
Dart.Ssh Namespace


LogEventArgs Class Members

[image]
PowerTCP SSH and SFTP for .NET
LogEventArgs Class Members
See Also Properties Methods Send comments on this topic
Dart.Ssh Namespace : LogEventArgs Class

Glossary Item Box

The following tables list the members exposed by LogEventArgs.

Public Properties

 | Name | Description
Public Property | Direction | Indicates whether the packet was sent or received.
Public Property | Packet | Returns a Packet that interprets an SSH packet.
Top

Public Methods

 | Name | Description
Public Method | ToString | Returns a formatted string suitable for viewing.
Top

See Also

Reference

LogEventArgs Class
Dart.Ssh Namespace


LogEventArgs Class Methods

[image]
PowerTCP SSH and SFTP for .NET
LogEventArgs Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : LogEventArgs Class

Glossary Item Box

For a list of all members of this type, see LogEventArgs members.

Public Methods

 | Name | Description
Public Method | ToString | Returns a formatted string suitable for viewing.
Top

See Also

Reference

LogEventArgs Class
Dart.Ssh Namespace


ToString Method

[image]
PowerTCP SSH and SFTP for .NET
ToString Method
See Also Send comments on this topic
Dart.Ssh Namespace > LogEventArgs Class : ToString Method

Glossary Item Box

Returns a formatted string suitable for viewing.

Syntax

Visual Basic (Declaration)
Public Overrides Function ToString() As String
Visual Basic (Usage) Copy Code
Dim instance As LogEventArgs
Dim value As String

value = instance.ToString()
C#
public override string ToString()
Managed Extensions for C++
public: string* ToString(); override
C++/CLI
public:
String^ ToString(); override

See Also

Reference

LogEventArgs Class
LogEventArgs Members


LogEventArgs Class Properties

[image]
PowerTCP SSH and SFTP for .NET
LogEventArgs Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : LogEventArgs Class

Glossary Item Box

For a list of all members of this type, see LogEventArgs members.

Public Properties

 | Name | Description
Public Property | Direction | Indicates whether the packet was sent or received.
Public Property | Packet | Returns a Packet that interprets an SSH packet.
Top

See Also

Reference

LogEventArgs Class
Dart.Ssh Namespace


Direction Property

[image]
PowerTCP SSH and SFTP for .NET
Direction Property
See Also Send comments on this topic
Dart.Ssh Namespace > LogEventArgs Class : Direction Property

Glossary Item Box

Indicates whether the packet was sent or received.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Direction As DataDirection
Visual Basic (Usage) Copy Code
Dim instance As LogEventArgs
Dim value As DataDirection

value = instance.Direction
C#
public DataDirection Direction {get;}
Managed Extensions for C++
public: __property DataDirection get_Direction();
C++/CLI
public:
property DataDirection Direction {
   DataDirection get();
}

See Also

Reference

LogEventArgs Class
LogEventArgs Members


Packet Property

[image]
PowerTCP SSH and SFTP for .NET
Packet Property
See Also Send comments on this topic
Dart.Ssh Namespace > LogEventArgs Class : Packet Property

Glossary Item Box

Returns a Packet that interprets an SSH packet.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Packet As Packet
Visual Basic (Usage) Copy Code
Dim instance As LogEventArgs
Dim value As Packet

value = instance.Packet
C#
public Packet Packet {get;}
Managed Extensions for C++
public: __property Packet* get_Packet();
C++/CLI
public:
property Packet^ Packet {
   Packet^ get();
}

See Also

Reference

LogEventArgs Class
LogEventArgs Members


LoginData Class

[image]
PowerTCP SSH and SFTP for .NET
LoginData Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : LoginData Class

Glossary Item Box

Contains connection data for a server using generic username/password authentication.

Object Model

LoginData Class

Syntax

Visual Basic (Declaration)
<SerializableAttribute()>
Public Class LoginData
Visual Basic (Usage) Copy Code
Dim instance As LoginData
C#
[Serializable()]
public class LoginData
Managed Extensions for C++
[Serializable()]
public __gc class LoginData
C++/CLI
[Serializable()]
public ref class LoginData

Inheritance Hierarchy

System.Object
Dart.Ssh.LoginData
Dart.Ssh.HttpProxyData
Dart.Ssh.SshLoginData

See Also

Reference

LoginData Members
Dart.Ssh Namespace


LoginData Class Members

[image]
PowerTCP SSH and SFTP for .NET
LoginData Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : LoginData Class

Glossary Item Box

The following tables list the members exposed by LoginData.

Public Constructors

 | Name | Description
Public Constructor | LoginData Constructor | Overloaded.
Top

Public Properties

 | Name | Description
Public Property | HostNameOrAddress | The hostname or address in dot notation.
Public Property | Password | The password for basic authentication.
Public Property | Port | The port.
Public Property | Username | The username for basic authentication (null if no authentication is needed).
Top

See Also

Reference

LoginData Class
Dart.Ssh Namespace


LoginData Constructor

[image]
PowerTCP SSH and SFTP for .NET
LoginData Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > LoginData Class : LoginData Constructor

Glossary Item Box

Overload List

Overload | Description
LoginData Constructor() | Used to hold generic login information.
LoginData Constructor(String,Int32,String,String) | Connection data for a server using generic username/password authentication.

See Also

Reference

LoginData Class
LoginData Members


LoginData Constructor()

[image]
PowerTCP SSH and SFTP for .NET
LoginData Constructor()
See Also Send comments on this topic
Dart.Ssh Namespace > LoginData Class > LoginData Constructor : LoginData Constructor()

Glossary Item Box

Used to hold generic login information.

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As New LoginData()
C#
public LoginData()
Managed Extensions for C++
public: LoginData();
C++/CLI
public:
LoginData();

See Also

Reference

LoginData Class
LoginData Members
Overload List


LoginData Constructor(String,Int32,String,String)

[image]
PowerTCP SSH and SFTP for .NET
LoginData Constructor(String,Int32,String,String)
See Also Send comments on this topic
Dart.Ssh Namespace > LoginData Class > LoginData Constructor : LoginData Constructor(String,Int32,String,String)

hostNameOrAddress
Hostname or address in dot notation.
port
Port
username
Username for basic authentication (null if no authentication is needed)
password
Password for basic authentication (null if no authentication is needed)

Glossary Item Box

Connection data for a server using generic username/password authentication.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal hostNameOrAddress As String, _
   ByVal port As Integer, _
   ByVal username As String, _
   ByVal password As String _
)
Visual Basic (Usage) Copy Code
Dim hostNameOrAddress As String
Dim port As Integer
Dim username As String
Dim password As String

Dim instance As New LoginData(hostNameOrAddress, port, username, password)
C#
public LoginData(
   string hostNameOrAddress,
   int port,
   string username,
   string password
)
Managed Extensions for C++
public: LoginData(
   string* hostNameOrAddress,
   int port,
   string* username,
   string* password
)
C++/CLI
public:
LoginData(
   String^ hostNameOrAddress,
   int port,
   String^ username,
   String^ password
)

Parameters

hostNameOrAddress
Hostname or address in dot notation.
port
Port
username
Username for basic authentication (null if no authentication is needed)
password
Password for basic authentication (null if no authentication is needed)

See Also

Reference

LoginData Class
LoginData Members
Overload List


LoginData Class Properties

[image]
PowerTCP SSH and SFTP for .NET
LoginData Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : LoginData Class

Glossary Item Box

For a list of all members of this type, see LoginData members.

Public Properties

 | Name | Description
Public Property | HostNameOrAddress | The hostname or address in dot notation.
Public Property | Password | The password for basic authentication.
Public Property | Port | The port.
Public Property | Username | The username for basic authentication (null if no authentication is needed).
Top

See Also

Reference

LoginData Class
Dart.Ssh Namespace


HostNameOrAddress Property

[image]
PowerTCP SSH and SFTP for .NET
HostNameOrAddress Property
See Also Send comments on this topic
Dart.Ssh Namespace > LoginData Class : HostNameOrAddress Property

Glossary Item Box

The hostname or address in dot notation.

Syntax

Visual Basic (Declaration)
Public Property HostNameOrAddress As String
Visual Basic (Usage) Copy Code
Dim instance As LoginData
Dim value As String

instance.HostNameOrAddress = value

value = instance.HostNameOrAddress
C#
public string HostNameOrAddress {get; set;}
Managed Extensions for C++
public: __property string* get_HostNameOrAddress();
public: __property void set_HostNameOrAddress(
   string* value
);
C++/CLI
public:
property String^ HostNameOrAddress {
   String^ get();
   void set (    String^ value);
}

See Also

Reference

LoginData Class
LoginData Members


Password Property

[image]
PowerTCP SSH and SFTP for .NET
Password Property
See Also Send comments on this topic
Dart.Ssh Namespace > LoginData Class : Password Property

Glossary Item Box

The password for basic authentication.

Syntax

Visual Basic (Declaration)
Public Property Password As String
Visual Basic (Usage) Copy Code
Dim instance As LoginData
Dim value As String

instance.Password = value

value = instance.Password
C#
public string Password {get; set;}
Managed Extensions for C++
public: __property string* get_Password();
public: __property void set_Password(
   string* value
);
C++/CLI
public:
property String^ Password {
   String^ get();
   void set (    String^ value);
}

See Also

Reference

LoginData Class
LoginData Members


Port Property

[image]
PowerTCP SSH and SFTP for .NET
Port Property
See Also Send comments on this topic
Dart.Ssh Namespace > LoginData Class : Port Property

Glossary Item Box

The port.

Syntax

Visual Basic (Declaration)
Public Property Port As Integer
Visual Basic (Usage) Copy Code
Dim instance As LoginData
Dim value As Integer

instance.Port = value

value = instance.Port
C#
public int Port {get; set;}
Managed Extensions for C++
public: __property int get_Port();
public: __property void set_Port(
   int value
);
C++/CLI
public:
property int Port {
   int get();
   void set (    int value);
}

See Also

Reference

LoginData Class
LoginData Members


Username Property

[image]
PowerTCP SSH and SFTP for .NET
Username Property
See Also Send comments on this topic
Dart.Ssh Namespace > LoginData Class : Username Property

Glossary Item Box

The username for basic authentication (null if no authentication is needed).

Syntax

Visual Basic (Declaration)
Public Property Username As String
Visual Basic (Usage) Copy Code
Dim instance As LoginData
Dim value As String

instance.Username = value

value = instance.Username
C#
public string Username {get; set;}
Managed Extensions for C++
public: __property string* get_Username();
public: __property void set_Username(
   string* value
);
C++/CLI
public:
property String^ Username {
   String^ get();
   void set (    String^ value);
}

See Also

Reference

LoginData Class
LoginData Members


NegotiateException Class

[image]
PowerTCP SSH and SFTP for .NET
NegotiateException Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : NegotiateException Class

Glossary Item Box

Thrown when KEX parameter negotiation fails.

Object Model

NegotiateException Class

Syntax

Visual Basic (Declaration)
Public Class NegotiateException
   Inherits System.Exception
Visual Basic (Usage) Copy Code
Dim instance As NegotiateException
C#
public class NegotiateException : System.Exception
Managed Extensions for C++
public __gc class NegotiateException : public System.Exception
C++/CLI
public ref class NegotiateException : public System.Exception

Inheritance Hierarchy

System.Object
System.Exception
Dart.Ssh.NegotiateException

See Also

Reference

NegotiateException Members
Dart.Ssh Namespace


NegotiateException Class Members

[image]
PowerTCP SSH and SFTP for .NET
NegotiateException Class Members
See Also Properties Methods Events Send comments on this topic
Dart.Ssh Namespace : NegotiateException Class

Glossary Item Box

The following tables list the members exposed by NegotiateException.

Public Constructors

 | Name | Description
Public Constructor | NegotiateException Constructor | Thrown when KEX parameter negotiation fails.
Top

Public Properties

 | Name | Description
Public Property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from System.Exception)
Public Property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from System.Exception)
Public Property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from System.Exception)
Public Property | InnerException | Gets the System.Exception instance that caused the current exception. (Inherited from System.Exception)
Public Property | Message | Gets a message that describes the current exception. (Inherited from System.Exception)
Public Property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from System.Exception)
Public Property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from System.Exception)
Public Property | TargetSite | Gets the method that throws the current exception. (Inherited from System.Exception)
Top

Public Methods

 | Name | Description
Public Method | GetBaseException | When overridden in a derived class, returns the System.Exception that is the root cause of one or more subsequent exceptions. (Inherited from System.Exception)
Public Method | GetObjectData | When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception. (Inherited from System.Exception)
Public Method | GetType | Gets the runtime type of the current instance. (Inherited from System.Exception)
Public Method | ToString | Creates and returns a string representation of the current exception. (Inherited from System.Exception)
Top

Protected Events

 | Name | Description
Protected Event | SerializeObjectState | Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Inherited from System.Exception)
Top

See Also

Reference

NegotiateException Class
Dart.Ssh Namespace


NegotiateException Constructor

[image]
PowerTCP SSH and SFTP for .NET
NegotiateException Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > NegotiateException Class : NegotiateException Constructor

message

Glossary Item Box

Thrown when KEX parameter negotiation fails.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal message As String _
)
Visual Basic (Usage) Copy Code
Dim message As String

Dim instance As New NegotiateException(message)
C#
public NegotiateException(
   string message
)
Managed Extensions for C++
public: NegotiateException(
   string* message
)
C++/CLI
public:
NegotiateException(
   String^ message
)

Parameters

message

See Also

Reference

NegotiateException Class
NegotiateException Members


Optimizations Class

[image]
PowerTCP SSH and SFTP for .NET
Optimizations Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : Optimizations Class

Glossary Item Box

Contains properties for optimizing file transfer speed.

Object Model

Optimizations Class

Syntax

Visual Basic (Declaration)
<SerializableAttribute()>
Public Class Optimizations
Visual Basic (Usage) Copy Code
Dim instance As Optimizations
C#
[Serializable()]
public class Optimizations
Managed Extensions for C++
[Serializable()]
public __gc class Optimizations
C++/CLI
[Serializable()]
public ref class Optimizations

Inheritance Hierarchy

System.Object
Dart.Ssh.Optimizations

See Also

Reference

Optimizations Members
Dart.Ssh Namespace


Optimizations Class Members

[image]
PowerTCP SSH and SFTP for .NET
Optimizations Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : Optimizations Class

Glossary Item Box

The following tables list the members exposed by Optimizations.

Public Constructors

 | Name | Description
Public Constructor | Optimizations Constructor | Constructor for the Optimizations class.
Top

Public Properties

 | Name | Description
Public Property | BlockSize | Gets or sets the buffer size used for local file I/O, and determines the frequency that the Progress event is raised at.
Public Property | ReadAheadBuffers | Gets or sets the number of read-ahead buffers used when Get is called.
Public Property | UseAppend | Controls how the server-side file is accessed when Put is called.
Public Property | WriteAheadBuffers | Gets or sets the number of write-ahead buffers used when Put is called.
Top

See Also

Reference

Optimizations Class
Dart.Ssh Namespace


Optimizations Constructor

[image]
PowerTCP SSH and SFTP for .NET
Optimizations Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > Optimizations Class : Optimizations Constructor

Glossary Item Box

Constructor for the Optimizations class.

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As New Optimizations()
C#
public Optimizations()
Managed Extensions for C++
public: Optimizations();
C++/CLI
public:
Optimizations();

See Also

Reference

Optimizations Class
Optimizations Members


Optimizations Class Properties

[image]
PowerTCP SSH and SFTP for .NET
Optimizations Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : Optimizations Class

Glossary Item Box

For a list of all members of this type, see Optimizations members.

Public Properties

 | Name | Description
Public Property | BlockSize | Gets or sets the buffer size used for local file I/O, and determines the frequency that the Progress event is raised at.
Public Property | ReadAheadBuffers | Gets or sets the number of read-ahead buffers used when Get is called.
Public Property | UseAppend | Controls how the server-side file is accessed when Put is called.
Public Property | WriteAheadBuffers | Gets or sets the number of write-ahead buffers used when Put is called.
Top

See Also

Reference

Optimizations Class
Dart.Ssh Namespace


BlockSize Property

[image]
PowerTCP SSH and SFTP for .NET
BlockSize Property
See Also Send comments on this topic
Dart.Ssh Namespace > Optimizations Class : BlockSize Property

Glossary Item Box

Gets or sets the buffer size used for local file I/O, and determines the frequency that the Progress event is raised at.

Syntax

Visual Basic (Declaration)
<DefaultValueAttribute()>
Public Property BlockSize As Integer
Visual Basic (Usage) Copy Code
Dim instance As Optimizations
Dim value As Integer

instance.BlockSize = value

value = instance.BlockSize
C#
[DefaultValue()]
public int BlockSize {get; set;}
Managed Extensions for C++
[DefaultValue()]
public: __property int get_BlockSize();
public: __property void set_BlockSize(
   int value
);
C++/CLI
[DefaultValue()]
public:
property int BlockSize {
   int get();
   void set (    int value);
}

Property Value

Defaults to 65536.

Remarks

The Progress event will be raised at the frequency set by this property. Set this property to a lower number to have the Progress event raised more frequently.

Reading and writing file operations are done 32678 bytes at a time, so for optimal perfomance the BlockSize property should be set using the following algorithm:

((ReadAheadBuffers + 1) / 2) * 32768

Note that setting this value below 32768 may result in a transfer speed decrease.

See Also

Reference

Optimizations Class
Optimizations Members


ReadAheadBuffers Property

[image]
PowerTCP SSH and SFTP for .NET
ReadAheadBuffers Property
See Also Send comments on this topic
Dart.Ssh Namespace > Optimizations Class : ReadAheadBuffers Property

Glossary Item Box

Gets or sets the number of read-ahead buffers used when Get is called.

Syntax

Visual Basic (Declaration)
<DefaultValueAttribute()>
Public Property ReadAheadBuffers As Integer
Visual Basic (Usage) Copy Code
Dim instance As Optimizations
Dim value As Integer

instance.ReadAheadBuffers = value

value = instance.ReadAheadBuffers
C#
[DefaultValue()]
public int ReadAheadBuffers {get; set;}
Managed Extensions for C++
[DefaultValue()]
public: __property int get_ReadAheadBuffers();
public: __property void set_ReadAheadBuffers(
   int value
);
C++/CLI
[DefaultValue()]
public:
property int ReadAheadBuffers {
   int get();
   void set (    int value);
}

Remarks

Defaults to 3, which pipelines 3 file read requests (BlockSize controls the number of bytes used for each request). Set to 0 to disable this optimization.

See BlockSize for notes on perfomance.

See Also

Reference

Optimizations Class
Optimizations Members


UseAppend Property

[image]
PowerTCP SSH and SFTP for .NET
UseAppend Property
See Also Send comments on this topic
Dart.Ssh Namespace > Optimizations Class : UseAppend Property

Glossary Item Box

Controls how the server-side file is accessed when Put is called.

Syntax

Visual Basic (Declaration)
<DefaultValueAttribute()>
Public Property UseAppend As Boolean
Visual Basic (Usage) Copy Code
Dim instance As Optimizations
Dim value As Boolean

instance.UseAppend = value

value = instance.UseAppend
C#
[DefaultValue()]
public bool UseAppend {get; set;}
Managed Extensions for C++
[DefaultValue()]
public: __property bool get_UseAppend();
public: __property void set_UseAppend(
   bool value
);
C++/CLI
[DefaultValue()]
public:
property bool UseAppend {
   bool get();
   void set (    bool value);
}

Remarks

Defaults to false. When set to true, server-side file access is instructed to write data to file with append instead of by offset, which can improve upload speed. Not supported on some servers.

See Also

Reference

Optimizations Class
Optimizations Members


WriteAheadBuffers Property

[image]
PowerTCP SSH and SFTP for .NET
WriteAheadBuffers Property
See Also Send comments on this topic
Dart.Ssh Namespace > Optimizations Class : WriteAheadBuffers Property

Glossary Item Box

Gets or sets the number of write-ahead buffers used when Put is called.

Syntax

Visual Basic (Declaration)
<ObsoleteAttribute("The WriteAheadBuffers property is no longer used as an optimization.")>
<DefaultValueAttribute()>
Public Property WriteAheadBuffers As Integer
Visual Basic (Usage) Copy Code
Dim instance As Optimizations
Dim value As Integer

instance.WriteAheadBuffers = value

value = instance.WriteAheadBuffers
C#
[Obsolete("The WriteAheadBuffers property is no longer used as an optimization.")]
[DefaultValue()]
public int WriteAheadBuffers {get; set;}
Managed Extensions for C++
[Obsolete("The WriteAheadBuffers property is no longer used as an optimization.")]
[DefaultValue()]
public: __property int get_WriteAheadBuffers();
public: __property void set_WriteAheadBuffers(
   int value
);
C++/CLI
[Obsolete("The WriteAheadBuffers property is no longer used as an optimization.")]
[DefaultValue()]
public:
property int WriteAheadBuffers {
   int get();
   void set (    int value);
}

Remarks

Defaults to 3, which pipelines 3 file write requests (BlockSize controls the number of bytes used for each request). Set to 0 to disable this optimization.

See Also

Reference

Optimizations Class
Optimizations Members


Packet Class

[image]
PowerTCP SSH and SFTP for .NET
Packet Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : Packet Class

Glossary Item Box

Base class used to interpret the contents of an SSH-2 packet.

Object Model

Packet Class

Syntax

Visual Basic (Declaration)
Public Class Packet
Visual Basic (Usage) Copy Code
Dim instance As Packet
C#
public class Packet
Managed Extensions for C++
public __gc class Packet
C++/CLI
public ref class Packet

Inheritance Hierarchy

System.Object
Dart.Ssh.Packet
Dart.Ssh.ChannelPacket

See Also

Reference

Packet Members
Dart.Ssh Namespace


Packet Class Members

[image]
PowerTCP SSH and SFTP for .NET
Packet Class Members
See Also Fields Properties Methods Send comments on this topic
Dart.Ssh Namespace : Packet Class

Glossary Item Box

The following tables list the members exposed by Packet.

Public Fields

 | Name | Description
Public Field | Content | The bytes sent or received.
Top

Public Properties

 | Name | Description
Public Property | Message | The transport-level SSH-2 message type.
Top

Public Methods

 | Name | Description
static (Shared in Visual Basic) | Create | Creates a Packet, ChannelPacket, or SftpPacket, depending upon the packet content provided.
Public Method | ToString | Returns a formatted string suitable for viewing.
Top

See Also

Reference

Packet Class
Dart.Ssh Namespace


Packet Class Methods

[image]
PowerTCP SSH and SFTP for .NET
Packet Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : Packet Class

Glossary Item Box

For a list of all members of this type, see Packet members.

Public Methods

 | Name | Description
static (Shared in Visual Basic) | Create | Creates a Packet, ChannelPacket, or SftpPacket, depending upon the packet content provided.
Public Method | ToString | Returns a formatted string suitable for viewing.
Top

See Also

Reference

Packet Class
Dart.Ssh Namespace


Create Method

[image]
PowerTCP SSH and SFTP for .NET
Create Method
See Also Send comments on this topic
Dart.Ssh Namespace > Packet Class : Create Method

msg
SSH-2 packet bytes.
msglen
Byte count of the packet.

Glossary Item Box

Creates a Packet, ChannelPacket, or SftpPacket, depending upon the packet content provided.

Syntax

Visual Basic (Declaration)
Public Shared Function Create( _
   ByVal msg() As Byte, _
   ByVal msglen As Integer _
) As Packet
Visual Basic (Usage) Copy Code
Dim msg() As Byte
Dim msglen As Integer
Dim value As Packet

value = Packet.Create(msg, msglen)
C#
public static Packet Create(
   byte[] msg,
   int msglen
)
Managed Extensions for C++
public: static Packet* Create(
   byte[]* msg,
   int msglen
)
C++/CLI
public:
static Packet^ Create(
   array<byte>^ msg,
   int msglen
)

Parameters

msg
SSH-2 packet bytes.
msglen
Byte count of the packet.

Return Value

A Packet that can be cast to it's type to access packet properties.

See Also

Reference

Packet Class
Packet Members


ToString Method

[image]
PowerTCP SSH and SFTP for .NET
ToString Method
See Also Send comments on this topic
Dart.Ssh Namespace > Packet Class : ToString Method

Glossary Item Box

Returns a formatted string suitable for viewing.

Syntax

Visual Basic (Declaration)
Public Overrides Function ToString() As String
Visual Basic (Usage) Copy Code
Dim instance As Packet
Dim value As String

value = instance.ToString()
C#
public override string ToString()
Managed Extensions for C++
public: string* ToString(); override
C++/CLI
public:
String^ ToString(); override

See Also

Reference

Packet Class
Packet Members


Packet Class Properties

[image]
PowerTCP SSH and SFTP for .NET
Packet Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : Packet Class

Glossary Item Box

For a list of all members of this type, see Packet members.

Public Properties

 | Name | Description
Public Property | Message | The transport-level SSH-2 message type.
Top

See Also

Reference

Packet Class
Dart.Ssh Namespace


Message Property

[image]
PowerTCP SSH and SFTP for .NET
Message Property
See Also Send comments on this topic
Dart.Ssh Namespace > Packet Class : Message Property

Glossary Item Box

The transport-level SSH-2 message type.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Message As PacketMessage
Visual Basic (Usage) Copy Code
Dim instance As Packet
Dim value As PacketMessage

value = instance.Message
C#
public PacketMessage Message {get;}
Managed Extensions for C++
public: __property PacketMessage get_Message();
C++/CLI
public:
property PacketMessage Message {
   PacketMessage get();
}

See Also

Reference

Packet Class
Packet Members


Packet Class Fields

[image]
PowerTCP SSH and SFTP for .NET
Packet Class Fields
See Also Send comments on this topic
Dart.Ssh Namespace : Packet Class

Glossary Item Box

For a list of all members of this type, see Packet members.

Public Fields

 | Name | Description
Public Field | Content | The bytes sent or received.
Top

See Also

Reference

Packet Class
Dart.Ssh Namespace


Content Field

[image]
PowerTCP SSH and SFTP for .NET
Content Field
See Also Send comments on this topic
Dart.Ssh Namespace > Packet Class : Content Field

Glossary Item Box

The bytes sent or received.

Syntax

Visual Basic (Declaration)
Public ReadOnly Content As Byte()
Visual Basic (Usage) Copy Code
Dim instance As Packet
Dim value() As Byte

value = instance.Content
C#
public readonly byte[] Content
Managed Extensions for C++
public: readonly byte[]* Content
C++/CLI
public:
readonly array<byte>^ Content

See Also

Reference

Packet Class
Packet Members


ProgressEventArgs Class

[image]
PowerTCP SSH and SFTP for .NET
ProgressEventArgs Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : ProgressEventArgs Class

Glossary Item Box

Provides progress information to the user as a copy operation proceeds.

Object Model

ProgressEventArgs ClassCopyResult ClassListProgress Class

Syntax

Visual Basic (Declaration)
Public Class ProgressEventArgs
   Inherits BaseEventArgs
Visual Basic (Usage) Copy Code
Dim instance As ProgressEventArgs
C#
public class ProgressEventArgs : BaseEventArgs
Managed Extensions for C++
public __gc class ProgressEventArgs : public BaseEventArgs
C++/CLI
public ref class ProgressEventArgs : public BaseEventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
Dart.Ssh.BaseEventArgs
Dart.Ssh.ProgressEventArgs

See Also

Reference

ProgressEventArgs Members
Dart.Ssh Namespace


ProgressEventArgs Class Members

[image]
PowerTCP SSH and SFTP for .NET
ProgressEventArgs Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : ProgressEventArgs Class

Glossary Item Box

The following tables list the members exposed by ProgressEventArgs.

Public Properties

 | Name | Description
Public Property | Item | Gets progress for the current file or directory in the copy operation.
Public Property | List | Gets progress for the entire copy operation.
Top

See Also

Reference

ProgressEventArgs Class
Dart.Ssh Namespace


ProgressEventArgs Class Properties

[image]
PowerTCP SSH and SFTP for .NET
ProgressEventArgs Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : ProgressEventArgs Class

Glossary Item Box

For a list of all members of this type, see ProgressEventArgs members.

Public Properties

 | Name | Description
Public Property | Item | Gets progress for the current file or directory in the copy operation.
Public Property | List | Gets progress for the entire copy operation.
Top

See Also

Reference

ProgressEventArgs Class
Dart.Ssh Namespace


Item Property

[image]
PowerTCP SSH and SFTP for .NET
Item Property
See Also Send comments on this topic
Dart.Ssh Namespace > ProgressEventArgs Class : Item Property

Glossary Item Box

Gets progress for the current file or directory in the copy operation.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Item As CopyResult
Visual Basic (Usage) Copy Code
Dim instance As ProgressEventArgs
Dim value As CopyResult

value = instance.Item
C#
public CopyResult Item {get;}
Managed Extensions for C++
public: __property CopyResult* get_Item();
C++/CLI
public:
property CopyResult^ Item {
   CopyResult^ get();
}

See Also

Reference

ProgressEventArgs Class
ProgressEventArgs Members


List Property

[image]
PowerTCP SSH and SFTP for .NET
List Property
See Also Send comments on this topic
Dart.Ssh Namespace > ProgressEventArgs Class : List Property

Glossary Item Box

Gets progress for the entire copy operation.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property List As ListProgress
Visual Basic (Usage) Copy Code
Dim instance As ProgressEventArgs
Dim value As ListProgress

value = instance.List
C#
public ListProgress List {get;}
Managed Extensions for C++
public: __property ListProgress* get_List();
C++/CLI
public:
property ListProgress^ List {
   ListProgress^ get();
}

See Also

Reference

ProgressEventArgs Class
ProgressEventArgs Members


RemoveResult Class

[image]
PowerTCP SSH and SFTP for .NET
RemoveResult Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : RemoveResult Class

Glossary Item Box

Provides the results of a requested remove operation.

Object Model

RemoveResult Class

Syntax

Visual Basic (Declaration)
Public Class RemoveResult
Visual Basic (Usage) Copy Code
Dim instance As RemoveResult
C#
public class RemoveResult
Managed Extensions for C++
public __gc class RemoveResult
C++/CLI
public ref class RemoveResult

Inheritance Hierarchy

System.Object
Dart.Ssh.RemoveResult
Dart.Ssh.CopyResult

See Also

Reference

RemoveResult Members
Dart.Ssh Namespace


RemoveResult Class Members

[image]
PowerTCP SSH and SFTP for .NET
RemoveResult Class Members
See Also Properties Methods Send comments on this topic
Dart.Ssh Namespace : RemoveResult Class

Glossary Item Box

The following tables list the members exposed by RemoveResult.

Public Properties

 | Name | Description
Public Property | IsDirectory | Returns true if the item is a directory.
Public Property | RemotePath | Gets the absolute path of the file or folder on the server.
Top

Public Methods

 | Name | Description
Public Method | GetException | Gets any Exception that occurred during the operation.
Top

See Also

Reference

RemoveResult Class
Dart.Ssh Namespace


RemoveResult Class Methods

[image]
PowerTCP SSH and SFTP for .NET
RemoveResult Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : RemoveResult Class

Glossary Item Box

For a list of all members of this type, see RemoveResult members.

Public Methods

 | Name | Description
Public Method | GetException | Gets any Exception that occurred during the operation.
Top

See Also

Reference

RemoveResult Class
Dart.Ssh Namespace


GetException Method

[image]
PowerTCP SSH and SFTP for .NET
GetException Method
See Also Send comments on this topic
Dart.Ssh Namespace > RemoveResult Class : GetException Method

Glossary Item Box

Gets any Exception that occurred during the operation.

Syntax

Visual Basic (Declaration)
Public Function GetException() As Exception
Visual Basic (Usage) Copy Code
Dim instance As RemoveResult
Dim value As Exception

value = instance.GetException()
C#
public Exception GetException()
Managed Extensions for C++
public: Exception* GetException();
C++/CLI
public:
Exception^ GetException();

Return Value

An Exception, otherwise null.

See Also

Reference

RemoveResult Class
RemoveResult Members


RemoveResult Class Properties

[image]
PowerTCP SSH and SFTP for .NET
RemoveResult Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : RemoveResult Class

Glossary Item Box

For a list of all members of this type, see RemoveResult members.

Public Properties

 | Name | Description
Public Property | IsDirectory | Returns true if the item is a directory.
Public Property | RemotePath | Gets the absolute path of the file or folder on the server.
Top

See Also

Reference

RemoveResult Class
Dart.Ssh Namespace


IsDirectory Property

[image]
PowerTCP SSH and SFTP for .NET
IsDirectory Property
See Also Send comments on this topic
Dart.Ssh Namespace > RemoveResult Class : IsDirectory Property

Glossary Item Box

Returns true if the item is a directory.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property IsDirectory As Boolean
Visual Basic (Usage) Copy Code
Dim instance As RemoveResult
Dim value As Boolean

value = instance.IsDirectory
C#
public bool IsDirectory {get;}
Managed Extensions for C++
public: __property bool get_IsDirectory();
C++/CLI
public:
property bool IsDirectory {
   bool get();
}

See Also

Reference

RemoveResult Class
RemoveResult Members


RemotePath Property

[image]
PowerTCP SSH and SFTP for .NET
RemotePath Property
See Also Send comments on this topic
Dart.Ssh Namespace > RemoveResult Class : RemotePath Property

Glossary Item Box

Gets the absolute path of the file or folder on the server.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property RemotePath As String
Visual Basic (Usage) Copy Code
Dim instance As RemoveResult
Dim value As String

value = instance.RemotePath
C#
public string RemotePath {get;}
Managed Extensions for C++
public: __property string* get_RemotePath();
C++/CLI
public:
property String^ RemotePath {
   String^ get();
}

See Also

Reference

RemoveResult Class
RemoveResult Members


Segment Class

[image]
PowerTCP SSH and SFTP for .NET
Segment Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : Segment Class

Glossary Item Box

Used to describe a byte[] segment that holds data.

Object Model

Segment Class

Syntax

Visual Basic (Declaration)
Public Class Segment
Visual Basic (Usage) Copy Code
Dim instance As Segment
C#
public class Segment
Managed Extensions for C++
public __gc class Segment
C++/CLI
public ref class Segment

Inheritance Hierarchy

System.Object
Dart.Ssh.Segment
Dart.Ssh.Data

See Also

Reference

Segment Members
Dart.Ssh Namespace


Segment Class Members

[image]
PowerTCP SSH and SFTP for .NET
Segment Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : Segment Class

Glossary Item Box

The following tables list the members exposed by Segment.

Public Constructors

 | Name | Description
Public Constructor | Segment Constructor | Used to create a Segment object that holds a buffer of data.
Top

Public Properties

 | Name | Description
Public Property | Buffer | Gets the buffer that holds data.
Public Property | Count | Byte count of data.
Public Property | Offset | The offset into the buffer where the data starts.
Top

See Also

Reference

Segment Class
Dart.Ssh Namespace


Segment Constructor

[image]
PowerTCP SSH and SFTP for .NET
Segment Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > Segment Class : Segment Constructor

buffer
Byte[] containing data.
offset
Offset into the buffer where the data starts.
count
Byte count of data.

Glossary Item Box

Used to create a Segment object that holds a buffer of data.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal buffer() As Byte, _
   ByVal offset As Integer, _
   ByVal count As Integer _
)
Visual Basic (Usage) Copy Code
Dim buffer() As Byte
Dim offset As Integer
Dim count As Integer

Dim instance As New Segment(buffer, offset, count)
C#
public Segment(
   byte[] buffer,
   int offset,
   int count
)
Managed Extensions for C++
public: Segment(
   byte[]* buffer,
   int offset,
   int count
)
C++/CLI
public:
Segment(
   array<byte>^ buffer,
   int offset,
   int count
)

Parameters

buffer
Byte[] containing data.
offset
Offset into the buffer where the data starts.
count
Byte count of data.

See Also

Reference

Segment Class
Segment Members


Segment Class Properties

[image]
PowerTCP SSH and SFTP for .NET
Segment Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : Segment Class

Glossary Item Box

For a list of all members of this type, see Segment members.

Public Properties

 | Name | Description
Public Property | Buffer | Gets the buffer that holds data.
Public Property | Count | Byte count of data.
Public Property | Offset | The offset into the buffer where the data starts.
Top

See Also

Reference

Segment Class
Dart.Ssh Namespace


Buffer Property

[image]
PowerTCP SSH and SFTP for .NET
Buffer Property
See Also Send comments on this topic
Dart.Ssh Namespace > Segment Class : Buffer Property

Glossary Item Box

Gets the buffer that holds data.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Buffer As Byte()
Visual Basic (Usage) Copy Code
Dim instance As Segment
Dim value() As Byte

value = instance.Buffer
C#
public byte[] Buffer {get;}
Managed Extensions for C++
public: __property byte[]* get_Buffer();
C++/CLI
public:
property array<byte>^ Buffer {
   array<byte>^ get();
}

See Also

Reference

Segment Class
Segment Members


Count Property

[image]
PowerTCP SSH and SFTP for .NET
Count Property
See Also Send comments on this topic
Dart.Ssh Namespace > Segment Class : Count Property

Glossary Item Box

Byte count of data.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Count As Integer
Visual Basic (Usage) Copy Code
Dim instance As Segment
Dim value As Integer

value = instance.Count
C#
public int Count {get;}
Managed Extensions for C++
public: __property int get_Count();
C++/CLI
public:
property int Count {
   int get();
}

See Also

Reference

Segment Class
Segment Members


Offset Property

[image]
PowerTCP SSH and SFTP for .NET
Offset Property
See Also Send comments on this topic
Dart.Ssh Namespace > Segment Class : Offset Property

Glossary Item Box

The offset into the buffer where the data starts.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Offset As Integer
Visual Basic (Usage) Copy Code
Dim instance As Segment
Dim value As Integer

value = instance.Offset
C#
public int Offset {get;}
Managed Extensions for C++
public: __property int get_Offset();
C++/CLI
public:
property int Offset {
   int get();
}

See Also

Reference

Segment Class
Segment Members


Session Class

[image]
PowerTCP SSH and SFTP for .NET
Session Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : Session Class

Glossary Item Box

Session over which a single program is remotely executed.

Object Model

Session Class

Syntax

Visual Basic (Declaration)
Public Class Session
Visual Basic (Usage) Copy Code
Dim instance As Session
C#
public class Session
Managed Extensions for C++
public __gc class Session
C++/CLI
public ref class Session

Remarks

Program can be a shell, application or a system command, and may or may not have a tty. Only one program can be started on a session. Multiple sessions can be active simultaneously, however most SSH servers impose a limit on the number of concurrent sessions.

Inheritance Hierarchy

System.Object
Dart.Ssh.Session

See Also

Reference

Session Members
Dart.Ssh Namespace


Session Class Members

[image]
PowerTCP SSH and SFTP for .NET
Session Class Members
See Also Properties Methods Send comments on this topic
Dart.Ssh Namespace : Session Class

Glossary Item Box

The following tables list the members exposed by Session.

Public Properties

 | Name | Description
Public Property | Stderr | Carries data written by the remote process to the STDERR filedescriptor.
Top

Public Methods

 | Name | Description
Public Method | Break | Sends a BREAK request to the server.
Public Method | Close | Closes this session.
Public Method | ExecCommand | Executes a command on the remote machine.
Public Method | RequestX11Forwarding | Requests X11 forwarding for the current session.
Public Method | StartSubSystem | Starts a subsystem on the remote machine.
Public Method | WindowDimensionChange | Informs the server that the local terminal dimensions have changed.
Top

See Also

Reference

Session Class
Dart.Ssh Namespace


Session Class Methods

[image]
PowerTCP SSH and SFTP for .NET
Session Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : Session Class

Glossary Item Box

For a list of all members of this type, see Session members.

Public Methods

 | Name | Description
Public Method | Break | Sends a BREAK request to the server.
Public Method | Close | Closes this session.
Public Method | ExecCommand | Executes a command on the remote machine.
Public Method | RequestX11Forwarding | Requests X11 forwarding for the current session.
Public Method | StartSubSystem | Starts a subsystem on the remote machine.
Public Method | WindowDimensionChange | Informs the server that the local terminal dimensions have changed.
Top

See Also

Reference

Session Class
Dart.Ssh Namespace


Break Method

[image]
PowerTCP SSH and SFTP for .NET
Break Method
See Also Send comments on this topic
Dart.Ssh Namespace > Session Class : Break Method

breakLength
The number of milliseconds the virtual "break" key should be considered depressed.
wantReply
Specifies whether a reply is desired.

Glossary Item Box

Sends a BREAK request to the server.

Syntax

Visual Basic (Declaration)
Public Function Break( _
   ByVal breakLength As Integer, _
   ByVal wantReply As Boolean _
) As Boolean
Visual Basic (Usage) Copy Code
Dim instance As Session
Dim breakLength As Integer
Dim wantReply As Boolean
Dim value As Boolean

value = instance.Break(breakLength, wantReply)
C#
public bool Break(
   int breakLength,
   bool wantReply
)
Managed Extensions for C++
public: bool Break(
   int breakLength,
   bool wantReply
)
C++/CLI
public:
bool Break(
   int breakLength,
   bool wantReply
)

Parameters

breakLength
The number of milliseconds the virtual "break" key should be considered depressed.
wantReply
Specifies whether a reply is desired.

Exceptions

Exception | Description
System.IO.IOException | Thrown if the Session or the underlying connection is closed.

Remarks

Available by accessing the Session property and is provided for low-level control. Complies with RFC 4335.

See Also

Reference

Session Class
Session Members


Close Method

[image]
PowerTCP SSH and SFTP for .NET
Close Method
See Also Send comments on this topic
Dart.Ssh Namespace > Session Class : Close Method

Glossary Item Box

Closes this session.

Syntax

Visual Basic (Declaration)
Public Sub Close()
Visual Basic (Usage) Copy Code
Dim instance As Session

instance.Close()
C#
public void Close()
Managed Extensions for C++
public: void Close();
C++/CLI
public:
void Close();

Remarks

Always call this method to free up resources, even if an exception was thrown by another method call (or when getting an Exception on the Input- or OutputStreams).

Call Close to free resources, even if the server sent a close message.

This method is available by accessing the Session property and is provided for low-level control. It is normally used by invoking the SessionStream.Close method.

See Also

Reference

Session Class
Session Members


ExecCommand Method

[image]
PowerTCP SSH and SFTP for .NET
ExecCommand Method
See Also Send comments on this topic
Dart.Ssh Namespace > Session Class : ExecCommand Method

cmd
The command to execute on the remote host

Glossary Item Box

Executes a command on the remote machine.

Syntax

Visual Basic (Declaration)
Public Sub ExecCommand( _
   ByVal cmd As String _
)
Visual Basic (Usage) Copy Code
Dim instance As Session
Dim cmd As String

instance.ExecCommand(cmd)
C#
public void ExecCommand(
   string cmd
)
Managed Extensions for C++
public: void ExecCommand(
   string* cmd
)
C++/CLI
public:
void ExecCommand(
   String^ cmd
)

Parameters

cmd
The command to execute on the remote host

Exceptions

Exception | Description
System.IO.IOException | Thrown if the Session or the underlying connection is closed, or if a remote execution has already started.

Remarks

This method is available by accessing the Session property and is provided for low-level control. It is normally used by invoking the Execute(String) method.

See Also

Reference

Session Class
Session Members


RequestX11Forwarding Method

[image]
PowerTCP SSH and SFTP for .NET
RequestX11Forwarding Method
See Also Send comments on this topic
Dart.Ssh Namespace > Session Class : RequestX11Forwarding Method

hostname
The hostname of the real (target) X11 server (e.g., 127.0.0.1)
port
The port of the real (target) X11 server (e.g., 6010)
cookie
Cookie presented to the real X11 server
singleConnection
If true, instructs the server to only forward a single connection

Glossary Item Box

Requests X11 forwarding for the current session.

Syntax

Visual Basic (Declaration)
Public Sub RequestX11Forwarding( _
   ByVal hostname As String, _
   ByVal port As Integer, _
   ByVal cookie() As Byte, _
   ByVal singleConnection As Boolean _
)
Visual Basic (Usage) Copy Code
Dim instance As Session
Dim hostname As String
Dim port As Integer
Dim cookie() As Byte
Dim singleConnection As Boolean

instance.RequestX11Forwarding(hostname, port, cookie, singleConnection)
C#
public void RequestX11Forwarding(
   string hostname,
   int port,
   byte[] cookie,
   bool singleConnection
)
Managed Extensions for C++
public: void RequestX11Forwarding(
   string* hostname,
   int port,
   byte[]* cookie,
   bool singleConnection
)
C++/CLI
public:
void RequestX11Forwarding(
   String^ hostname,
   int port,
   array<byte>^ cookie,
   bool singleConnection
)

Parameters

hostname
The hostname of the real (target) X11 server (e.g., 127.0.0.1)
port
The port of the real (target) X11 server (e.g., 6010)
cookie
Cookie presented to the real X11 server
singleConnection
If true, instructs the server to only forward a single connection

Exceptions

Exception | Description
System.IO.IOException | Thrown if the Session or the underlying connection is closed, if X11 forwarding has already been requested for this Session, or if a remote execution has already started.

Remarks

This method may only be called before a program or shell is started in this session.

See Also

Reference

Session Class
Session Members


StartSubSystem Method

[image]
PowerTCP SSH and SFTP for .NET
StartSubSystem Method
See Also Send comments on this topic
Dart.Ssh Namespace > Session Class : StartSubSystem Method

name
The name of the subsystem

Glossary Item Box

Starts a subsystem on the remote machine.

Syntax

Visual Basic (Declaration)
Public Sub StartSubSystem( _
   ByVal name As String _
)
Visual Basic (Usage) Copy Code
Dim instance As Session
Dim name As String

instance.StartSubSystem(name)
C#
public void StartSubSystem(
   string name
)
Managed Extensions for C++
public: void StartSubSystem(
   string* name
)
C++/CLI
public:
void StartSubSystem(
   String^ name
)

Parameters

name
The name of the subsystem

Exceptions

Exception | Description
System.IO.IOException | Thrown if the underlying connection is closed or if a remote execution has already started.

Remarks

This method is available by accessing the Session property and is provided for low-level control. It is normally used by invoking the StartSubSystem method.

See Also

Reference

Session Class
Session Members


WindowDimensionChange Method

[image]
PowerTCP SSH and SFTP for .NET
WindowDimensionChange Method
See Also Send comments on this topic
Dart.Ssh Namespace > Session Class : WindowDimensionChange Method

term_width_characters
New terminal width, characters (e.g., 80)
term_height_characters
New terminal height, rows (e.g., 24)
term_width_pixels
New terminal width, pixels (e.g., 640)
term_height_pixels
New terminal height, pixels (e.g., 480)

Glossary Item Box

Informs the server that the local terminal dimensions have changed.

Syntax

Visual Basic (Declaration)
Public Sub WindowDimensionChange( _
   ByVal term_width_characters As Integer, _
   ByVal term_height_characters As Integer, _
   ByVal term_width_pixels As Integer, _
   ByVal term_height_pixels As Integer _
)
Visual Basic (Usage) Copy Code
Dim instance As Session
Dim term_width_characters As Integer
Dim term_height_characters As Integer
Dim term_width_pixels As Integer
Dim term_height_pixels As Integer

instance.WindowDimensionChange(term_width_characters, term_height_characters, term_width_pixels, term_height_pixels)
C#
public void WindowDimensionChange(
   int term_width_characters,
   int term_height_characters,
   int term_width_pixels,
   int term_height_pixels
)
Managed Extensions for C++
public: void WindowDimensionChange(
   int term_width_characters,
   int term_height_characters,
   int term_width_pixels,
   int term_height_pixels
)
C++/CLI
public:
void WindowDimensionChange(
   int term_width_characters,
   int term_height_characters,
   int term_width_pixels,
   int term_height_pixels
)

Parameters

term_width_characters
New terminal width, characters (e.g., 80)
term_height_characters
New terminal height, rows (e.g., 24)
term_width_pixels
New terminal width, pixels (e.g., 640)
term_height_pixels
New terminal height, pixels (e.g., 480)

Exceptions

Exception | Description
System.IO.IOException | Thrown if the Session or the underlying connection is closed, or if no PTY was requested for this Session.

Remarks

Informs the server that the local terminal dimensions have changed and that this change shall be reflected to the remote pseudo terminal driver. This method may only be called when a pty (pseudo-terminal) is allocated.

Zero dimension parameters are ignored. The character/row dimensions override the pixel dimensions (when nonzero). Pixel dimensions refer to the drawable area of the window. The dimension parameters are only informational.

See Also

Reference

Session Class
Session Members


Session Class Properties

[image]
PowerTCP SSH and SFTP for .NET
Session Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : Session Class

Glossary Item Box

For a list of all members of this type, see Session members.

Public Properties

 | Name | Description
Public Property | Stderr | Carries data written by the remote process to the STDERR filedescriptor.
Top

See Also

Reference

Session Class
Dart.Ssh Namespace


Stderr Property

[image]
PowerTCP SSH and SFTP for .NET
Stderr Property
See Also Send comments on this topic
Dart.Ssh Namespace > Session Class : Stderr Property

Glossary Item Box

Carries data written by the remote process to the STDERR filedescriptor.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Stderr As Stream
Visual Basic (Usage) Copy Code
Dim instance As Session
Dim value As Stream

value = instance.Stderr
C#
public Stream Stderr {get;}
Managed Extensions for C++
public: __property Stream* get_Stderr();
C++/CLI
public:
property Stream^ Stderr {
   Stream^ get();
}

See Also

Reference

Session Class
Session Members


SessionStream Class

[image]
PowerTCP SSH and SFTP for .NET
SessionStream Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : SessionStream Class

Glossary Item Box

Provides a stream interface to a Session.

Object Model

SessionStream Class

Syntax

Visual Basic (Declaration)
Public Class SessionStream
   Inherits System.IO.Stream
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
C#
public class SessionStream : System.IO.Stream
Managed Extensions for C++
public __gc class SessionStream : public System.IO.Stream
C++/CLI
public ref class SessionStream : public System.IO.Stream

Remarks

The SessionStream class creates a new SSH session interface based upon the Session passed into its constructor. Multiple sessions can be created using the same Connection. Each SessionStream executes a single application or system command on the host, and is closed when that application or command completes.

Typically, a SessionStream will be used to allow user interaction with a shell using a PTY (pseudo terminal), or it will be used to execute a single user application or system command.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.IO.Stream
Dart.Ssh.SessionStream

See Also

Reference

SessionStream Members
Dart.Ssh Namespace


SessionStream Class Members

[image]
PowerTCP SSH and SFTP for .NET
SessionStream Class Members
See Also Fields Properties Methods Send comments on this topic
Dart.Ssh Namespace : SessionStream Class

Glossary Item Box

The following tables list the members exposed by SessionStream.

Public Constructors

 | Name | Description
Public Constructor | SessionStream Constructor | Provides a stream interface to a Session.
Top

Public Fields

 | Name | Description
Public Field | Session | Gets the Session object provided in the constructor.
Top

Public Properties

 | Name | Description
Public Property | CanRead | Overridden. Gets a value indicating if the session is active.
Public Property | CanSeek | Overridden. Gets a value indicating if a seek can be performed on the stream. Always returns false.
Public Property | CanTimeout | Gets a value that determines whether the current stream can time out. (Inherited from System.IO.Stream)
Public Property | CanWrite | Overridden. Gets a value indicating if the stream can be written to.
Public Property | ErrorStream | Gets the Stream that can be read for error conditions.
Public Property | Length | Overridden. The length of data available on the stream. This method always throws a NotSupportedException.
Public Property | Position | Overridden. Gets the position in the stream. Use of this property throws a System.NotSupportedException.
Public Property | ReadTimeout | Overridden. Gets or sets the read timeout period for the Stream in milliseconds.
Public Property | Tag | Gets or sets an object that stores any user data.
Public Property | WriteTimeout | Overridden. Gets or sets the write timeout period for the Stream in milliseconds.
Top

Public Methods

 | Name | Description
Public Method | BeginRead | Begins an asynchronous read operation. (Consider using System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | BeginWrite | Begins an asynchronous write operation. (Consider using System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | Close | Overridden. Closes the stream.
Public Method | CopyTo | Overloaded. Reads the bytes from the current stream and writes them to another stream. (Inherited from System.IO.Stream)
Public Method | CopyToAsync | Overloaded. Asynchronously reads the bytes from the current stream and writes them to another stream. (Inherited from System.IO.Stream)
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Dispose | Overloaded. Overridden. Releases the unmanaged resources used by the Stream and optionally releases the managed resources.
Public Method | EndRead | Waits for the pending asynchronous read to complete. (Consider using System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | EndWrite | Ends an asynchronous write operation. (Consider using System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | Flush | Overridden. Default implementation is no-op. May be overridden by derived classes.
Public Method | FlushAsync | Overloaded. Asynchronously clears all buffers for this stream and causes any buffered data to be written to the underlying device. (Inherited from System.IO.Stream)
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Read | Overloaded. Overridden. Reads session data provided by the SSH-2 host.
Public Method | ReadAsync | Overloaded. Asynchronously reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (Inherited from System.IO.Stream)
Public Method | ReadByte | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. (Inherited from System.IO.Stream)
Public Method | ReadToEnd | Receives data until the connection is closed.
Public Method | Seek | Overridden. This method throws a System.NotSupportedException.
Public Method | SetLength | Overridden. This method throws a NotSupportedException.
Public Method | Write | Overloaded. Overridden. Writes user data to a stream that is received by the SSH-2 host.
Public Method | WriteAsync | Overloaded. Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (Inherited from System.IO.Stream)
Public Method | WriteByte | Writes a byte to the current position in the stream and advances the position within the stream by one byte. (Inherited from System.IO.Stream)
Top

Protected Methods

 | Name | Description
Protected Method | CreateWaitHandle | Allocates a System.Threading.WaitHandle object. (Inherited from System.IO.Stream)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | ObjectInvariant | Provides support for a System.Diagnostics.Contracts.Contract. (Inherited from System.IO.Stream)
Top

See Also

Reference

SessionStream Class
Dart.Ssh Namespace


SessionStream Constructor

[image]
PowerTCP SSH and SFTP for .NET
SessionStream Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : SessionStream Constructor

session
A new Session created by a Connection.
ssh
The Ssh component associated with the SessionStream.

Glossary Item Box

Provides a stream interface to a Session.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal session As Session, _
   ByVal ssh As Ssh _
)
Visual Basic (Usage) Copy Code
Dim session As Session
Dim ssh As Ssh

Dim instance As New SessionStream(session, ssh)
C#
public SessionStream(
   Session session,
   Ssh ssh
)
Managed Extensions for C++
public: SessionStream(
   Session* session,
   Ssh* ssh
)
C++/CLI
public:
SessionStream(
   Session^ session,
   Ssh^ ssh
)

Parameters

session
A new Session created by a Connection.
ssh
The Ssh component associated with the SessionStream.

See Also

Reference

SessionStream Class
SessionStream Members


SessionStream Class Methods

[image]
PowerTCP SSH and SFTP for .NET
SessionStream Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : SessionStream Class

Glossary Item Box

For a list of all members of this type, see SessionStream members.

Public Methods

 | Name | Description
Public Method | BeginRead | Begins an asynchronous read operation. (Consider using System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | BeginWrite | Begins an asynchronous write operation. (Consider using System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | Close | Overridden. Closes the stream.
Public Method | CopyTo | Overloaded. Reads the bytes from the current stream and writes them to another stream. (Inherited from System.IO.Stream)
Public Method | CopyToAsync | Overloaded. Asynchronously reads the bytes from the current stream and writes them to another stream. (Inherited from System.IO.Stream)
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Dispose | Overloaded. Overridden. Releases the unmanaged resources used by the Stream and optionally releases the managed resources.
Public Method | EndRead | Waits for the pending asynchronous read to complete. (Consider using System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | EndWrite | Ends an asynchronous write operation. (Consider using System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | Flush | Overridden. Default implementation is no-op. May be overridden by derived classes.
Public Method | FlushAsync | Overloaded. Asynchronously clears all buffers for this stream and causes any buffered data to be written to the underlying device. (Inherited from System.IO.Stream)
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Read | Overloaded. Overridden. Reads session data provided by the SSH-2 host.
Public Method | ReadAsync | Overloaded. Asynchronously reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (Inherited from System.IO.Stream)
Public Method | ReadByte | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. (Inherited from System.IO.Stream)
Public Method | ReadToEnd | Receives data until the connection is closed.
Public Method | Seek | Overridden. This method throws a System.NotSupportedException.
Public Method | SetLength | Overridden. This method throws a NotSupportedException.
Public Method | Write | Overloaded. Overridden. Writes user data to a stream that is received by the SSH-2 host.
Public Method | WriteAsync | Overloaded. Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (Inherited from System.IO.Stream)
Public Method | WriteByte | Writes a byte to the current position in the stream and advances the position within the stream by one byte. (Inherited from System.IO.Stream)
Top

Protected Methods

 | Name | Description
Protected Method | CreateWaitHandle | Allocates a System.Threading.WaitHandle object. (Inherited from System.IO.Stream)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | ObjectInvariant | Provides support for a System.Diagnostics.Contracts.Contract. (Inherited from System.IO.Stream)
Top

See Also

Reference

SessionStream Class
Dart.Ssh Namespace


Close Method

[image]
PowerTCP SSH and SFTP for .NET
Close Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : Close Method

Glossary Item Box

Closes the stream.

Syntax

Visual Basic (Declaration)
Public Overrides Sub Close()
Visual Basic (Usage) Copy Code
Dim instance As SessionStream

instance.Close()
C#
public override void Close()
Managed Extensions for C++
public: void Close(); override
C++/CLI
public:
void Close(); override

See Also

Reference

SessionStream Class
SessionStream Members


Dispose Method

[image]
PowerTCP SSH and SFTP for .NET
Dispose Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : Dispose Method

Glossary Item Box

Releases the unmanaged resources used by the Stream and optionally releases the managed resources.

Overload List

Overload | Description
Dispose(Boolean) | Releases the unmanaged resources used by the Stream and optionally releases the managed resources.
Dispose() | Releases all resources used by the System.IO.Stream. (Inherited from System.IO.Stream)

See Also

Reference

SessionStream Class
SessionStream Members


Dispose(Boolean) Method

[image]
PowerTCP SSH and SFTP for .NET
Dispose(Boolean) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class > Dispose Method : Dispose(Boolean) Method

disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.

Glossary Item Box

Releases the unmanaged resources used by the Stream and optionally releases the managed resources.

Syntax

Visual Basic (Declaration)
Protected Overloads Overrides Sub Dispose( _
   ByVal disposing As Boolean _
)
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim disposing As Boolean

instance.Dispose(disposing)
C#
protected override void Dispose(
   bool disposing
)
Managed Extensions for C++
protected: void Dispose(
   bool disposing
) override
C++/CLI
protected:
void Dispose(
   bool disposing
) override

Parameters

disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.

See Also

Reference

SessionStream Class
SessionStream Members
Overload List


Flush Method

[image]
PowerTCP SSH and SFTP for .NET
Flush Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : Flush Method

Glossary Item Box

Default implementation is no-op. May be overridden by derived classes.

Syntax

Visual Basic (Declaration)
Public Overrides Sub Flush()
Visual Basic (Usage) Copy Code
Dim instance As SessionStream

instance.Flush()
C#
public override void Flush()
Managed Extensions for C++
public: void Flush(); override
C++/CLI
public:
void Flush(); override

See Also

Reference

SessionStream Class
SessionStream Members


Read Method

[image]
PowerTCP SSH and SFTP for .NET
Read Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : Read Method

Glossary Item Box

Reads session data provided by the SSH-2 host.

Overload List

Overload | Description
Read(Byte[],Int32,Int32) | Reads session data provided by the SSH-2 host.
Read(Byte[],Int32,Int32,Object) | Reads session data provided by the SSH-2 host using a reference to a buffer that is marshaled by the COM interface.
Read(Byte[]) | Receives data from the remote host.
Read(String[],Object) | Receives data until a delimiter is found.
Read(String,Object) | Receives data until a delimiter is found.

See Also

Reference

SessionStream Class
SessionStream Members


Read(Byte[],Int32,Int32) Method

[image]
PowerTCP SSH and SFTP for .NET
Read(Byte[],Int32,Int32) Method
See Also Example Send comments on this topic
Dart.Ssh Namespace > SessionStream Class > Read Method : Read(Byte[],Int32,Int32) Method

buffer
Buffer where data is to be copied to.
offset
Offset into the buffer.
count
Number of bytes available in buffer starting at the offset.

Glossary Item Box

Reads session data provided by the SSH-2 host.

Syntax

Visual Basic (Declaration)
Public Overloads Overrides Function Read( _
   ByVal buffer() As Byte, _
   ByVal offset As Integer, _
   ByVal count As Integer _
) As Integer
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim buffer() As Byte
Dim offset As Integer
Dim count As Integer
Dim value As Integer

value = instance.Read(buffer, offset, count)
C#
public override int Read(
   byte[] buffer,
   int offset,
   int count
)
Managed Extensions for C++
public: int Read(
   byte[]* buffer,
   int offset,
   int count
) override
C++/CLI
public:
int Read(
   array<byte>^ buffer,
   int offset,
   int count
) override

Parameters

buffer
Buffer where data is to be copied to.
offset
Offset into the buffer.
count
Number of bytes available in buffer starting at the offset.

Return Value

The number of bytes read. Returns 0 if the server has closed the channel.

Remarks

This method always blocks, and is normally invoked from a worker thread.

Example

The example below demonstrates how to receive data without blocking the UI.
C# Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
    //Connect and log into the server. Can be executed on a worker
    //thread to not block the UI; executed synchronously here for simplicity
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword);
    //Execute the specified 'receiveData' method on a worker thread to not block the UI
    ssh1.Start(receiveData, null);
}

private void connectAndLogin(string hostname, int port, string username, string password)
{
    //Connect to the server
    ssh1.Connection.RemoteEndPoint.HostNameOrAddress = hostname;
    ssh1.Connection.RemoteEndPoint.Port = port; //Usually 22
    ssh1.Connect();

    //Authenticate
    SshLoginData loginDetails = new SshLoginData();
    loginDetails.Username = username;
    loginDetails.Password = password;
    ssh1.Authenticate(loginDetails);
}

/// <summary>
/// Receives data from the server and marshals it to the UI thread for display.
/// </summary>
/// <param name="notUsed">Not used in this snippet</param>
private void receiveData(object notUsed)
{
    //Establish a shell
    SessionStream session = ssh1.StartShell();

    //Receive data when it is sent by the remote host
    //Marshal it to the UI for display
    while (true)
    {
        byte[] buf = new byte[1024];
        Data data = session.Read(buf);
        //If data.Count is 0, the connection has been closed, so break out of the loop.
        if (data.Count == 0)
            break;
        ssh1.Marshal(data, session, "", null);
    }
}

/// <summary>
/// Raised on the UI thread, when ssh1.Marshal is called in receiveData.
/// </summary>
private void ssh1_Data(object sender, SshDataEventArgs e)
{
    textBox1.AppendText(e.Data.ToString());
}
Visual Basic Copy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    'Connect and log into the server. Can be executed on a worker
    'thread to not block the UI; executed synchronously here for simplicity
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword)
    'Execute the specified 'receiveData' method on a worker thread to not block the UI
    ssh1.Start(AddressOf receiveData, Nothing)
End Sub

Private Sub connectAndLogin(ByVal hostname As String, ByVal port As Integer, ByVal username As String, ByVal password As String)
    'Connect to the server
    ssh1.Connection.RemoteEndPoint.HostNameOrAddress = hostname
    ssh1.Connection.RemoteEndPoint.Port = port 'Usually 22
    ssh1.Connect()

    'Authenticate
    Dim loginDetails As New SshLoginData()
    loginDetails.Username = username
    loginDetails.Password = password
    ssh1.Authenticate(loginDetails)
End Sub

''' <summary>
''' Receives data from the server and marshals it to the UI thread for display.
''' </summary>
''' <param name="notUsed">Not used in this snippet</param>
Private Sub receiveData(ByVal notUsed As Object)
    'Establish a shell
    Dim session As SessionStream = ssh1.StartShell()

    'Receive data when it is sent by the remote host
    'Marshal it to the UI for display
    Do
        Dim buf(1023) As Byte
        Dim data As Data = session.Read(buf)
        'If data.Count is 0, the connection has been closed, so break out of the loop.
        If data.Count = 0 Then
            Exit Do
        End If
        ssh1.Marshal(data, session, "", Nothing)
    Loop
End Sub

''' <summary>
''' Raised on the UI thread, when ssh1.Marshal is called in receiveData.
''' </summary>
Private Sub ssh1_Data(ByVal sender As Object, ByVal e As SshDataEventArgs) Handles ssh1.Data
    textBox1.AppendText(e.Data.ToString())
End Sub

See Also

Reference

SessionStream Class
SessionStream Members
Overload List


Read(Byte[],Int32,Int32,Object) Method

[image]
PowerTCP SSH and SFTP for .NET
Read(Byte[],Int32,Int32,Object) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class > Read Method : Read(Byte[],Int32,Int32,Object) Method

buffer
Buffer where data is to be copied to.
offset
Offset into the buffer.
count
Number of bytes available in buffer starting at the offset.
state
Optional parameter useful for passing state information to the Data event in a COM environment.

Glossary Item Box

Reads session data provided by the SSH-2 host using a reference to a buffer that is marshaled by the COM interface.

Syntax

Visual Basic (Declaration)
Public Overloads Function Read( _
   ByRef buffer As Byte(), _
   ByVal offset As Integer, _
   ByVal count As Integer, _
   ByVal state As Object _
) As Data
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim buffer As Byte()
Dim offset As Integer
Dim count As Integer
Dim state As Object
Dim value As Data

value = instance.Read(buffer, offset, count, state)
C#
public Data Read(
   ref byte[] buffer,
   int offset,
   int count,
   object state
)
Managed Extensions for C++
public: Data* Read(
   ref byte[] buffer,
   int offset,
   int count,
   Object* state
)
C++/CLI
public:
Data^ Read(
   array<byte>% buffer,
   int offset,
   int count,
   Object^ state
)

Parameters

buffer
Buffer where data is to be copied to.
offset
Offset into the buffer.
count
Number of bytes available in buffer starting at the offset.
state
Optional parameter useful for passing state information to the Data event in a COM environment.

Return Value

A Data object encapsulating the received data.

Remarks

If Ssh.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Ssh.Data event is raised containing the result upon completion, or the Ssh.Error event is raised if an exception is thrown. This method is not threadsafe.

See Also

Reference

SessionStream Class
SessionStream Members
Overload List


Read(Byte[]) Method

[image]
PowerTCP SSH and SFTP for .NET
Read(Byte[]) Method
See Also Example Send comments on this topic
Dart.Ssh Namespace > SessionStream Class > Read Method : Read(Byte[]) Method

buffer
The byte array used to store the received data.

Glossary Item Box

Receives data from the remote host.

Syntax

Visual Basic (Declaration)
Public Overloads Function Read( _
   ByVal buffer() As Byte _
) As Data
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim buffer() As Byte
Dim value As Data

value = instance.Read(buffer)
C#
public Data Read(
   byte[] buffer
)
Managed Extensions for C++
public: Data* Read(
   byte[]* buffer
)
C++/CLI
public:
Data^ Read(
   array<byte>^ buffer
)

Parameters

buffer
The byte array used to store the received data.

Return Value

A Data object encapsulating the received data.

Remarks

This method will read as much data as is available, up to the size of the buffer.

Example

The example below demonstrates how to receive data without blocking the UI.
C# Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
    //Connect and log into the server. Can be executed on a worker
    //thread to not block the UI; executed synchronously here for simplicity
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword);
    //Execute the specified 'receiveData' method on a worker thread to not block the UI
    ssh1.Start(receiveData, null);
}

private void connectAndLogin(string hostname, int port, string username, string password)
{
    //Connect to the server
    ssh1.Connection.RemoteEndPoint.HostNameOrAddress = hostname;
    ssh1.Connection.RemoteEndPoint.Port = port; //Usually 22
    ssh1.Connect();

    //Authenticate
    SshLoginData loginDetails = new SshLoginData();
    loginDetails.Username = username;
    loginDetails.Password = password;
    ssh1.Authenticate(loginDetails);
}

/// <summary>
/// Receives data from the server and marshals it to the UI thread for display.
/// </summary>
/// <param name="notUsed">Not used in this snippet</param>
private void receiveData(object notUsed)
{
    //Establish a shell
    SessionStream session = ssh1.StartShell();

    //Receive data when it is sent by the remote host
    //Marshal it to the UI for display
    while (true)
    {
        byte[] buf = new byte[1024];
        Data data = session.Read(buf);
        //If data.Count is 0, the connection has been closed, so break out of the loop.
        if (data.Count == 0)
            break;
        ssh1.Marshal(data, session, "", null);
    }
}

/// <summary>
/// Raised on the UI thread, when ssh1.Marshal is called in receiveData.
/// </summary>
private void ssh1_Data(object sender, SshDataEventArgs e)
{
    textBox1.AppendText(e.Data.ToString());
}
Visual Basic Copy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    'Connect and log into the server. Can be executed on a worker
    'thread to not block the UI; executed synchronously here for simplicity
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword)
    'Execute the specified 'receiveData' method on a worker thread to not block the UI
    ssh1.Start(AddressOf receiveData, Nothing)
End Sub

Private Sub connectAndLogin(ByVal hostname As String, ByVal port As Integer, ByVal username As String, ByVal password As String)
    'Connect to the server
    ssh1.Connection.RemoteEndPoint.HostNameOrAddress = hostname
    ssh1.Connection.RemoteEndPoint.Port = port 'Usually 22
    ssh1.Connect()

    'Authenticate
    Dim loginDetails As New SshLoginData()
    loginDetails.Username = username
    loginDetails.Password = password
    ssh1.Authenticate(loginDetails)
End Sub

''' <summary>
''' Receives data from the server and marshals it to the UI thread for display.
''' </summary>
''' <param name="notUsed">Not used in this snippet</param>
Private Sub receiveData(ByVal notUsed As Object)
    'Establish a shell
    Dim session As SessionStream = ssh1.StartShell()

    'Receive data when it is sent by the remote host
    'Marshal it to the UI for display
    Do
        Dim buf(1023) As Byte
        Dim data As Data = session.Read(buf)
        'If data.Count is 0, the connection has been closed, so break out of the loop.
        If data.Count = 0 Then
            Exit Do
        End If
        ssh1.Marshal(data, session, "", Nothing)
    Loop
End Sub

''' <summary>
''' Raised on the UI thread, when ssh1.Marshal is called in receiveData.
''' </summary>
Private Sub ssh1_Data(ByVal sender As Object, ByVal e As SshDataEventArgs) Handles ssh1.Data
    textBox1.AppendText(e.Data.ToString())
End Sub

See Also

Reference

SessionStream Class
SessionStream Members
Overload List


Read(String[],Object) Method

[image]
PowerTCP SSH and SFTP for .NET
Read(String[],Object) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class > Read Method : Read(String[],Object) Method

delimiters
An array of delimiters to search for. If null, the socket is read until a timeout occurs or the server closes the connection.
state
Optional parameter useful for passing state information to the Data event in a COM environment.

Glossary Item Box

Receives data until a delimiter is found.

Syntax

Visual Basic (Declaration)
Public Overloads Function Read( _
   ByVal delimiters() As String, _
   ByVal state As Object _
) As Data
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim delimiters() As String
Dim state As Object
Dim value As Data

value = instance.Read(delimiters, state)
C#
public Data Read(
   string[] delimiters,
   object state
)
Managed Extensions for C++
public: Data* Read(
   string*[]* delimiters,
   Object* state
)
C++/CLI
public:
Data^ Read(
   array<String^>^ delimiters,
   Object^ state
)

Parameters

delimiters
An array of delimiters to search for. If null, the socket is read until a timeout occurs or the server closes the connection.
state
Optional parameter useful for passing state information to the Data event in a COM environment.

Return Value

A Data object encapsulating the received data.

Remarks

This method blocks until a delimiter is found, the timeout period expires, or the server closes the connection. If the method times out, all received data will be returned, and an exception will NOT be thrown. Instead, the returned Data.Delimiter will be null, indicating no delimiter was not found.

If Ssh.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Ssh.Data event is raised containing the result upon completion, or the Ssh.Error event is raised if an exception is thrown. This method is not threadsafe.

See Also

Reference

SessionStream Class
SessionStream Members
Overload List


Read(String,Object) Method

[image]
PowerTCP SSH and SFTP for .NET
Read(String,Object) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class > Read Method : Read(String,Object) Method

delimiter
A delimiter string to search for. If null, the socket is read until a timeout occurs or the server closes the connection.
state
Optional parameter useful for passing state information to the Data event in a COM environment.

Glossary Item Box

Receives data until a delimiter is found.

Syntax

Visual Basic (Declaration)
Public Overloads Function Read( _
   ByVal delimiter As String, _
   ByVal state As Object _
) As Data
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim delimiter As String
Dim state As Object
Dim value As Data

value = instance.Read(delimiter, state)
C#
public Data Read(
   string delimiter,
   object state
)
Managed Extensions for C++
public: Data* Read(
   string* delimiter,
   Object* state
)
C++/CLI
public:
Data^ Read(
   String^ delimiter,
   Object^ state
)

Parameters

delimiter
A delimiter string to search for. If null, the socket is read until a timeout occurs or the server closes the connection.
state
Optional parameter useful for passing state information to the Data event in a COM environment.

Return Value

A Data object encapsulating the received data.

Remarks

This method blocks until the delimiter is found, the timeout period expires, or the server closes the connection. If the method times out, all received data will be returned, and an exception will NOT be thrown. Instead, the returned Data.Delimiter will be null, indicating the delimiter was not found.

See Also

Reference

SessionStream Class
SessionStream Members
Overload List


ReadToEnd Method

[image]
PowerTCP SSH and SFTP for .NET
ReadToEnd Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : ReadToEnd Method

Glossary Item Box

Receives data until the connection is closed.

Syntax

Visual Basic (Declaration)
Public Function ReadToEnd() As Data
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim value As Data

value = instance.ReadToEnd()
C#
public Data ReadToEnd()
Managed Extensions for C++
public: Data* ReadToEnd();
C++/CLI
public:
Data^ ReadToEnd();

Return Value

A Data object encapsulating the received data.

Remarks

This method blocks until the connection is closed. Data will not be made available until that time and the method returns.

See Also

Reference

SessionStream Class
SessionStream Members


Seek Method

[image]
PowerTCP SSH and SFTP for .NET
Seek Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : Seek Method

offset
origin

Glossary Item Box

This method throws a System.NotSupportedException.

Syntax

Visual Basic (Declaration)
Public Overrides Function Seek( _
   ByVal offset As Long, _
   ByVal origin As SeekOrigin _
) As Long
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim offset As Long
Dim origin As SeekOrigin
Dim value As Long

value = instance.Seek(offset, origin)
C#
public override long Seek(
   long offset,
   SeekOrigin origin
)
Managed Extensions for C++
public: long Seek(
   long offset,
   SeekOrigin origin
) override
C++/CLI
public:
int64 Seek(
   int64 offset,
   SeekOrigin origin
) override

Parameters

offset
origin

Exceptions

Exception | Description
System.NotSupportedException | Always throws this exception if used.

See Also

Reference

SessionStream Class
SessionStream Members


SetLength Method

[image]
PowerTCP SSH and SFTP for .NET
SetLength Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : SetLength Method

value

Glossary Item Box

This method throws a NotSupportedException.

Syntax

Visual Basic (Declaration)
Public Overrides Sub SetLength( _
   ByVal value As Long _
)
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim value As Long

instance.SetLength(value)
C#
public override void SetLength(
   long value
)
Managed Extensions for C++
public: void SetLength(
   long value
) override
C++/CLI
public:
void SetLength(
   int64 value
) override

Parameters

value

Exceptions

Exception | Description
System.NotSupportedException | Always throws this exception if used.

See Also

Reference

SessionStream Class
SessionStream Members


Write Method

[image]
PowerTCP SSH and SFTP for .NET
Write Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : Write Method

Glossary Item Box

Writes user data to a stream that is received by the SSH-2 host.

Overload List

Overload | Description
Write(Byte[],Int32,Int32) | Writes user data to a stream that is received by the SSH-2 host.
Write(Byte[],Int32,Int32,Object) | Writes data to a stream that is received by the SSH-2 host. Uses a reference to a buffer that is marshaled by the COM interface.
Write(Byte[]) | Sends data to the remote host.
Write(String) | Sends data to the remote host.

See Also

Reference

SessionStream Class
SessionStream Members


Write(Byte[],Int32,Int32) Method

[image]
PowerTCP SSH and SFTP for .NET
Write(Byte[],Int32,Int32) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class > Write Method : Write(Byte[],Int32,Int32) Method

buffer
Buffer where data is to be copied from.
offset
Starting offset into the buffer.
count
Number of bytes in buffer to be sent to the host.

Glossary Item Box

Writes user data to a stream that is received by the SSH-2 host.

Syntax

Visual Basic (Declaration)
Public Overloads Overrides Sub Write( _
   ByVal buffer() As Byte, _
   ByVal offset As Integer, _
   ByVal count As Integer _
)
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim buffer() As Byte
Dim offset As Integer
Dim count As Integer

instance.Write(buffer, offset, count)
C#
public override void Write(
   byte[] buffer,
   int offset,
   int count
)
Managed Extensions for C++
public: void Write(
   byte[]* buffer,
   int offset,
   int count
) override
C++/CLI
public:
void Write(
   array<byte>^ buffer,
   int offset,
   int count
) override

Parameters

buffer
Buffer where data is to be copied from.
offset
Starting offset into the buffer.
count
Number of bytes in buffer to be sent to the host.

See Also

Reference

SessionStream Class
SessionStream Members
Overload List


Write(Byte[],Int32,Int32,Object) Method

[image]
PowerTCP SSH and SFTP for .NET
Write(Byte[],Int32,Int32,Object) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class > Write Method : Write(Byte[],Int32,Int32,Object) Method

buffer
Buffer where data is to be copied from.
offset
Offset into the buffer.
count
Number of bytes to write starting at the offset.
notUsed
Null may be used.

Glossary Item Box

Writes data to a stream that is received by the SSH-2 host. Uses a reference to a buffer that is marshaled by the COM interface.

Syntax

Visual Basic (Declaration)
Public Overloads Sub Write( _
   ByRef buffer As Byte(), _
   ByVal offset As Integer, _
   ByVal count As Integer, _
   ByVal notUsed As Object _
)
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim buffer As Byte()
Dim offset As Integer
Dim count As Integer
Dim notUsed As Object

instance.Write(buffer, offset, count, notUsed)
C#
public void Write(
   ref byte[] buffer,
   int offset,
   int count,
   object notUsed
)
Managed Extensions for C++
public: void Write(
   ref byte[] buffer,
   int offset,
   int count,
   Object* notUsed
)
C++/CLI
public:
void Write(
   array<byte>% buffer,
   int offset,
   int count,
   Object^ notUsed
)

Parameters

buffer
Buffer where data is to be copied from.
offset
Offset into the buffer.
count
Number of bytes to write starting at the offset.
notUsed
Null may be used.

Remarks

This method is only required by the COM interface, and need not be used by .NET applications.

See Also

Reference

SessionStream Class
SessionStream Members
Overload List


Write(Byte[]) Method

[image]
PowerTCP SSH and SFTP for .NET
Write(Byte[]) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class > Write Method : Write(Byte[]) Method

buffer
Byte array of data to send.

Glossary Item Box

Sends data to the remote host.

Syntax

Visual Basic (Declaration)
Public Overloads Sub Write( _
   ByVal buffer() As Byte _
)
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim buffer() As Byte

instance.Write(buffer)
C#
public void Write(
   byte[] buffer
)
Managed Extensions for C++
public: void Write(
   byte[]* buffer
)
C++/CLI
public:
void Write(
   array<byte>^ buffer
)

Parameters

buffer
Byte array of data to send.

Remarks

This method synchronously sends data to the remote host over an existing connection. It will block until a buffer is available to accept the data or the WriteTimeout value has expired.

See Also

Reference

SessionStream Class
SessionStream Members
Overload List


Write(String) Method

[image]
PowerTCP SSH and SFTP for .NET
Write(String) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class > Write Method : Write(String) Method

data
String of data to send.

Glossary Item Box

Sends data to the remote host.

Syntax

Visual Basic (Declaration)
Public Overloads Sub Write( _
   ByVal data As String _
)
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim data As String

instance.Write(data)
C#
public void Write(
   string data
)
Managed Extensions for C++
public: void Write(
   string* data
)
C++/CLI
public:
void Write(
   String^ data
)

Parameters

data
String of data to send.

Remarks

This method synchronously sends data to the remote host over an existing connection. It will block until a buffer is available to accept the data or the WriteTimeout value has expired.

See Also

Reference

SessionStream Class
SessionStream Members
Overload List


SessionStream Class Properties

[image]
PowerTCP SSH and SFTP for .NET
SessionStream Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : SessionStream Class

Glossary Item Box

For a list of all members of this type, see SessionStream members.

Public Properties

 | Name | Description
Public Property | CanRead | Overridden. Gets a value indicating if the session is active.
Public Property | CanSeek | Overridden. Gets a value indicating if a seek can be performed on the stream. Always returns false.
Public Property | CanTimeout | Gets a value that determines whether the current stream can time out. (Inherited from System.IO.Stream)
Public Property | CanWrite | Overridden. Gets a value indicating if the stream can be written to.
Public Property | ErrorStream | Gets the Stream that can be read for error conditions.
Public Property | Length | Overridden. The length of data available on the stream. This method always throws a NotSupportedException.
Public Property | Position | Overridden. Gets the position in the stream. Use of this property throws a System.NotSupportedException.
Public Property | ReadTimeout | Overridden. Gets or sets the read timeout period for the Stream in milliseconds.
Public Property | Tag | Gets or sets an object that stores any user data.
Public Property | WriteTimeout | Overridden. Gets or sets the write timeout period for the Stream in milliseconds.
Top

See Also

Reference

SessionStream Class
Dart.Ssh Namespace


CanRead Property

[image]
PowerTCP SSH and SFTP for .NET
CanRead Property
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : CanRead Property

Glossary Item Box

Gets a value indicating if the session is active.

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property CanRead As Boolean
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim value As Boolean

value = instance.CanRead
C#
public override bool CanRead {get;}
Managed Extensions for C++
public: __property bool get_CanRead() override;
C++/CLI
public:
property bool CanRead {
   bool get() override;
}

See Also

Reference

SessionStream Class
SessionStream Members


CanSeek Property

[image]
PowerTCP SSH and SFTP for .NET
CanSeek Property
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : CanSeek Property

Glossary Item Box

Gets a value indicating if a seek can be performed on the stream. Always returns false.

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property CanSeek As Boolean
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim value As Boolean

value = instance.CanSeek
C#
public override bool CanSeek {get;}
Managed Extensions for C++
public: __property bool get_CanSeek() override;
C++/CLI
public:
property bool CanSeek {
   bool get() override;
}

See Also

Reference

SessionStream Class
SessionStream Members


CanWrite Property

[image]
PowerTCP SSH and SFTP for .NET
CanWrite Property
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : CanWrite Property

Glossary Item Box

Gets a value indicating if the stream can be written to.

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property CanWrite As Boolean
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim value As Boolean

value = instance.CanWrite
C#
public override bool CanWrite {get;}
Managed Extensions for C++
public: __property bool get_CanWrite() override;
C++/CLI
public:
property bool CanWrite {
   bool get() override;
}

Remarks

Returns true while the session is active.

See Also

Reference

SessionStream Class
SessionStream Members


ErrorStream Property

[image]
PowerTCP SSH and SFTP for .NET
ErrorStream Property
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : ErrorStream Property

Glossary Item Box

Gets the Stream that can be read for error conditions.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ErrorStream As Stream
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim value As Stream

value = instance.ErrorStream
C#
public Stream ErrorStream {get;}
Managed Extensions for C++
public: __property Stream* get_ErrorStream();
C++/CLI
public:
property Stream^ ErrorStream {
   Stream^ get();
}

See Also

Reference

SessionStream Class
SessionStream Members


Length Property

[image]
PowerTCP SSH and SFTP for .NET
Length Property
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : Length Property

Glossary Item Box

The length of data available on the stream. This method always throws a NotSupportedException.

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property Length As Long
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim value As Long

value = instance.Length
C#
public override long Length {get;}
Managed Extensions for C++
public: __property long get_Length() override;
C++/CLI
public:
property int64 Length {
   int64 get() override;
}

Property Value

A long value representing the length of the stream in bytes.

Exceptions

Exception | Description
System.NotSupportedException | Always throws this exception.

See Also

Reference

SessionStream Class
SessionStream Members


Position Property

[image]
PowerTCP SSH and SFTP for .NET
Position Property
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : Position Property

Glossary Item Box

Gets the position in the stream. Use of this property throws a System.NotSupportedException.

Syntax

Visual Basic (Declaration)
Public Overrides Property Position As Long
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim value As Long

instance.Position = value

value = instance.Position
C#
public override long Position {get; set;}
Managed Extensions for C++
public: __property long get_Position() override;
public: __property void set_Position(
   long value
) override;
C++/CLI
public:
property int64 Position {
   int64 get() override;
   void set (    int64 value) override;
}

Property Value

The current position within the stream.

Exceptions

Exception | Description
System.NotSupportedException.#ctor | Always throws this exception.

See Also

Reference

SessionStream Class
SessionStream Members


ReadTimeout Property

[image]
PowerTCP SSH and SFTP for .NET
ReadTimeout Property
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : ReadTimeout Property

Glossary Item Box

Gets or sets the read timeout period for the Stream in milliseconds.

Syntax

Visual Basic (Declaration)
Public Overrides Property ReadTimeout As Integer
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim value As Integer

instance.ReadTimeout = value

value = instance.ReadTimeout
C#
public override int ReadTimeout {get; set;}
Managed Extensions for C++
public: __property int get_ReadTimeout() override;
public: __property void set_ReadTimeout(
   int value
) override;
C++/CLI
public:
property int ReadTimeout {
   int get() override;
   void set (    int value) override;
}

See Also

Reference

SessionStream Class
SessionStream Members


Tag Property

[image]
PowerTCP SSH and SFTP for .NET
Tag Property
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : Tag Property

Glossary Item Box

Gets or sets an object that stores any user data.

Syntax

Visual Basic (Declaration)
Public Property Tag As Object
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim value As Object

instance.Tag = value

value = instance.Tag
C#
public object Tag {get; set;}
Managed Extensions for C++
public: __property Object* get_Tag();
public: __property void set_Tag(
   Object* value
);
C++/CLI
public:
property Object^ Tag {
   Object^ get();
   void set (    Object^ value);
}

See Also

Reference

SessionStream Class
SessionStream Members


WriteTimeout Property

[image]
PowerTCP SSH and SFTP for .NET
WriteTimeout Property
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : WriteTimeout Property

Glossary Item Box

Gets or sets the write timeout period for the Stream in milliseconds.

Syntax

Visual Basic (Declaration)
Public Overrides Property WriteTimeout As Integer
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim value As Integer

instance.WriteTimeout = value

value = instance.WriteTimeout
C#
public override int WriteTimeout {get; set;}
Managed Extensions for C++
public: __property int get_WriteTimeout() override;
public: __property void set_WriteTimeout(
   int value
) override;
C++/CLI
public:
property int WriteTimeout {
   int get() override;
   void set (    int value) override;
}

See Also

Reference

SessionStream Class
SessionStream Members


SessionStream Class Fields

[image]
PowerTCP SSH and SFTP for .NET
SessionStream Class Fields
See Also Send comments on this topic
Dart.Ssh Namespace : SessionStream Class

Glossary Item Box

For a list of all members of this type, see SessionStream members.

Public Fields

 | Name | Description
Public Field | Session | Gets the Session object provided in the constructor.
Top

See Also

Reference

SessionStream Class
Dart.Ssh Namespace


Session Field

[image]
PowerTCP SSH and SFTP for .NET
Session Field
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : Session Field

Glossary Item Box

Gets the Session object provided in the constructor.

Syntax

Visual Basic (Declaration)
Public ReadOnly Session As Session
Visual Basic (Usage) Copy Code
Dim instance As SessionStream
Dim value As Session

value = instance.Session
C#
public readonly Session Session
Managed Extensions for C++
public: readonly Session* Session
C++/CLI
public:
readonly Session^ Session

See Also

Reference

SessionStream Class
SessionStream Members


Sftp Class

[image]
PowerTCP SSH and SFTP for .NET
Sftp Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : Sftp Class

Glossary Item Box

The Sftp Component represents an SFTP client connection tunneled over a SSH-2 connection.

Object Model

Sftp ClassConnection ClassOptimizations Class

Syntax

Visual Basic (Declaration)
Public Class Sftp
   Inherits SshConnection
Visual Basic (Usage) Copy Code
Dim instance As Sftp
C#
public class Sftp : SshConnection
Managed Extensions for C++
public __gc class Sftp : public SshConnection
C++/CLI
public ref class Sftp : public SshConnection

Remarks

Most methods in this class map directly to one of the packet types described in draft-ietf-secsh-filexfer-13.txt.

Error handling: the methods of this class throw IOExceptions. However, unless there is catastrophic failure, exceptions of the type SftpException will be thrown (a subclass of IOException). Therefore, you can implement more verbose behavior by checking if a thrown exception if of the type SftpException. If yes, then you access detailed information about the failure.

Important notes about file names, directory names and paths:

  • SFTP v3 represents file names as strings. File names are assumed to use the slash ('/') character as a directory separator.
  • File names starting with a slash are "absolute", and are relative to the root of the file system. Names starting with any other character are relative to the user's working directory.
  • The Sftp component always uses absolute paths when communicating with the server. As a convenience to the user, the WorkingDirectory is populated after connecting, and is used whenever a relative path is provided, to construct an absolute path for communications.
  • An empty path name is valid, and it refers to the user's working directory (usually the user's home directory).

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Dart.Ssh.ComponentBase
Dart.Ssh.SshConnection
Dart.Ssh.Sftp

See Also

Reference

Sftp Members
Dart.Ssh Namespace


Sftp Class Members

[image]
PowerTCP SSH and SFTP for .NET
Sftp Class Members
See Also Properties Methods Events Send comments on this topic
Dart.Ssh Namespace : Sftp Class

Glossary Item Box

The following tables list the members exposed by Sftp.

Public Constructors

 | Name | Description
Public Constructor | Sftp Constructor | Overloaded.
Top

Public Properties

 | Name | Description
Public Property | AcceptAllHostKeys | When true, all host keys are accepted if not overridden with HostKeyEventArgs.Verified. When false, the SshConnection.HostKey event must be used to verify host keys. (Inherited from Dart.Ssh.SshConnection)
Public Property | AutoSetTime | Gets or sets whether the modified time should be updated on a file after a Put or Get.
Public Property | Connection | Gets the underlying Connection instance being used for server communications. (Inherited from Dart.Ssh.SshConnection)
Public Property | Container | (Inherited from System.ComponentModel.Component)
Public Property | Encoding | Character encoding used by the component. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Optimizations | Exposes properties used for optimizing file transfer speed.
Public Property | ProtocolVersion | Gets the negotiated SFTP protocol version.
Public Property | Site | (Inherited from System.ComponentModel.Component)
Public Property | State | Gets a value that reflects the current TCP connection state and SSH authentication state. (Inherited from Dart.Ssh.SshConnection)
Public Property | SynchronizingObject | Gets or sets the object used to marshal data to the UI thread (for raising events). (Inherited from Dart.Ssh.ComponentBase)
Public Property | SyncRoot | Gets an object that is used to synchronize access to the upper layer protocol in use. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Tag | Gets or sets an object that stores any user data. (Inherited from Dart.Ssh.ComponentBase)
Public Property | ThreadingModel | Controls the threading model used by the component. (Inherited from Dart.Ssh.ComponentBase)
Public Property | WorkingDirectory | Gets the fully specified working directory.
Top

Protected Properties

 | Name | Description
Protected Property | CanRaiseEvents | (Inherited from System.ComponentModel.Component)
Protected Property | DesignMode | (Inherited from System.ComponentModel.Component)
Protected Property | Events | (Inherited from System.ComponentModel.Component)
Top

Public Methods

 | Name | Description
Public Method | Abort | Requests cancellation of any on-going copy operations.
Public Method | Authenticate | Overloaded. Performs 'keyboard-interactive' authentication. (Inherited from Dart.Ssh.SshConnection)
Public Method | ChangeWorkingDirectory | Changes the working directory.
Public Method | Close | Overridden. Closes this SFTP session.
Public Method | Connect | Overloaded. Connects to the SSH-2 server specified by Connection.RemoteEndPoint. (Inherited from Dart.Ssh.SshConnection)
Public Method | CreateDirectory | Creates a new directory.
Public Method | CreateLink | Creates a symbolic link on the server. Creates a link "linkPath" that points to a target file or directory "targetPath".
Public Method | CreateLocalPortForwarder | Overloaded. Creates a new LocalPortForwarder. (Inherited from Dart.Ssh.SshConnection)
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Deserialize | Deserialize a previously serialized object. (Inherited from Dart.Ssh.ComponentBase)
Public Method | Dispose | Overloaded. Overridden. Releases all resources associated with the object.
Public Method | Get | Overloaded. Initiates a file copy from the remote server to the local client.
Public Method | GetAttributes | Gets the file attributes of a file. This method follows symbolic links on the server.
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | GetTarget | Gets the target of a symbolic link.
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | List | Lists the contents of a directory.
Public Method | ListEx | Lists the contents of a directory for COM environments.
Public Method | Marshal | Overloaded. Marshals a string and/or object to the UI thread and raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Public Method | OnBanner | Raises the SshConnection.Banner event. (Inherited from Dart.Ssh.SshConnection)
Public Method | OnChallenge | Raises the SshConnection.Challenge event. (Inherited from Dart.Ssh.SshConnection)
Public Method | OnHostKey | Raises the SshConnection.HostKey event. (Inherited from Dart.Ssh.SshConnection)
Public Method | OnProgress | Raises the Progress event.
Public Method | Put | Overloaded. Initiates a file copy from the local client to the remote server.
Public Method | Remove | Removes a file.
Public Method | RemoveDirectory | Removes a directory and its subfolders and files.
Public Method | Rename | Renames or moves a file or directory.
Public Method | Serialize | Serialize an object to the provided destination stream. (Inherited from Dart.Ssh.ComponentBase)
Public Method | SetAttributes | Modifies the attributes of a file. Used for operations such as changing the ownership, permissions or access times, as well as for truncating a file.
Public Method | Start | Starts a worker thread on which the specified delegate function executes.
Public Method | ToString | (Inherited from System.ComponentModel.Component)
Top

Protected Methods

 | Name | Description
Protected Method | Finalize | (Inherited from System.ComponentModel.Component)
Protected Method | GetService | (Inherited from System.ComponentModel.Component)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | OnError | Raises the Error event. (Inherited from Dart.Ssh.ComponentBase)
Protected Method | OnLog | Raises the Log event. (Inherited from Dart.Ssh.SshConnection)
Protected Method | OnStateChanged | Overridden. Overrides SshConnection.OnStateChanged.
Protected Method | OnUserState | Raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Top

Public Events

 | Name | Description
Public Event | Banner | Raised when the server presents a banner during authentication. (Inherited from Dart.Ssh.SshConnection)
Public Event | Challenge | Raised when the server presents its challenges during 'keyboard-interactive' authentication. (Inherited from Dart.Ssh.SshConnection)
Public Event | Disposed | (Inherited from System.ComponentModel.Component)
Public Event | Error | Raised when Marshal(Exception) is used or an unhandled Exception is thrown in a worker thread created using Start. (Inherited from Dart.Ssh.ComponentBase)
Public Event | HostKey | Raised when the server presents its hostkey while establishing a connection. (Inherited from Dart.Ssh.SshConnection)
Public Event | Log | Used to log packet-level communications. (Inherited from Dart.Ssh.SshConnection)
Public Event | Progress | Occurs as each buffer of file data is sent or received.
Public Event | StateChanged | Raised when the value of the State property changes, or a call to any Authenticate method returns. (Inherited from Dart.Ssh.SshConnection)
Public Event | UserState | Raised when Marshal(String,Object) is used. (Inherited from Dart.Ssh.ComponentBase)
Top

See Also

Reference

Sftp Class
Dart.Ssh Namespace


Sftp Constructor

[image]
PowerTCP SSH and SFTP for .NET
Sftp Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : Sftp Constructor

Glossary Item Box

Overload List

Overload | Description
Sftp Constructor() |
Sftp Constructor(IContainer) |

See Also

Reference

Sftp Class
Sftp Members


Sftp Constructor()

[image]
PowerTCP SSH and SFTP for .NET
Sftp Constructor()
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class > Sftp Constructor : Sftp Constructor()

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As New Sftp()
C#
public Sftp()
Managed Extensions for C++
public: Sftp();
C++/CLI
public:
Sftp();

Remarks

Basically, most methods in this class map directly to one of the packet types described in draft-ietf-secsh-filexfer-13.txt.

Error handling: the methods of this class throw IOExceptions. However, unless there is catastrophic failure, exceptions of the type SftpException will be thrown (a subclass of IOException). Therefore, you can implement more verbose behavior by checking if a thrown exception if of the type SftpException. If yes, then you access detailed information about the failure.

Important notes about file names, directory names and paths, copy-pasted from the SFTP specs:

  • SFTP v3 represents file names as strings. File names are assumed to use the slash ('/') character as a directory separator.
  • File names starting with a slash are "absolute", and are relative to the root of the file system. Names starting with any other character are relative to the user's working directory (represented by the WorkingDirectory property).

See Also

Reference

Sftp Class
Sftp Members
Overload List


Sftp Constructor(IContainer)

[image]
PowerTCP SSH and SFTP for .NET
Sftp Constructor(IContainer)
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class > Sftp Constructor : Sftp Constructor(IContainer)

container

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal container As IContainer _
)
Visual Basic (Usage) Copy Code
Dim container As IContainer

Dim instance As New Sftp(container)
C#
public Sftp(
   IContainer container
)
Managed Extensions for C++
public: Sftp(
   IContainer* container
)
C++/CLI
public:
Sftp(
   IContainer^ container
)

Parameters

container

Remarks

Basically, most methods in this class map directly to one of the packet types described in draft-ietf-secsh-filexfer-13.txt.

Error handling: the methods of this class throw IOExceptions. However, unless there is catastrophic failure, exceptions of the type SftpException will be thrown (a subclass of IOException). Therefore, you can implement more verbose behavior by checking if a thrown exception if of the type SftpException. If yes, then you access detailed information about the failure.

Important notes about file names, directory names and paths, copy-pasted from the SFTP specs:

  • SFTP v3 represents file names as strings. File names are assumed to use the slash ('/') character as a directory separator.
  • File names starting with a slash are "absolute", and are relative to the root of the file system. Names starting with any other character are relative to the user's working directory (represented by the WorkingDirectory property).

See Also

Reference

Sftp Class
Sftp Members
Overload List


Sftp Class Methods

[image]
PowerTCP SSH and SFTP for .NET
Sftp Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : Sftp Class

Glossary Item Box

For a list of all members of this type, see Sftp members.

Public Methods

 | Name | Description
Public Method | Abort | Requests cancellation of any on-going copy operations.
Public Method | Authenticate | Overloaded. Performs 'keyboard-interactive' authentication. (Inherited from Dart.Ssh.SshConnection)
Public Method | ChangeWorkingDirectory | Changes the working directory.
Public Method | Close | Overridden. Closes this SFTP session.
Public Method | Connect | Overloaded. Connects to the SSH-2 server specified by Connection.RemoteEndPoint. (Inherited from Dart.Ssh.SshConnection)
Public Method | CreateDirectory | Creates a new directory.
Public Method | CreateLink | Creates a symbolic link on the server. Creates a link "linkPath" that points to a target file or directory "targetPath".
Public Method | CreateLocalPortForwarder | Overloaded. Creates a new LocalPortForwarder. (Inherited from Dart.Ssh.SshConnection)
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Deserialize | Deserialize a previously serialized object. (Inherited from Dart.Ssh.ComponentBase)
Public Method | Dispose | Overloaded. Overridden. Releases all resources associated with the object.
Public Method | Get | Overloaded. Initiates a file copy from the remote server to the local client.
Public Method | GetAttributes | Gets the file attributes of a file. This method follows symbolic links on the server.
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | GetTarget | Gets the target of a symbolic link.
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | List | Lists the contents of a directory.
Public Method | ListEx | Lists the contents of a directory for COM environments.
Public Method | Marshal | Overloaded. Marshals a string and/or object to the UI thread and raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Public Method | OnBanner | Raises the SshConnection.Banner event. (Inherited from Dart.Ssh.SshConnection)
Public Method | OnChallenge | Raises the SshConnection.Challenge event. (Inherited from Dart.Ssh.SshConnection)
Public Method | OnHostKey | Raises the SshConnection.HostKey event. (Inherited from Dart.Ssh.SshConnection)
Public Method | OnProgress | Raises the Progress event.
Public Method | Put | Overloaded. Initiates a file copy from the local client to the remote server.
Public Method | Remove | Removes a file.
Public Method | RemoveDirectory | Removes a directory and its subfolders and files.
Public Method | Rename | Renames or moves a file or directory.
Public Method | Serialize | Serialize an object to the provided destination stream. (Inherited from Dart.Ssh.ComponentBase)
Public Method | SetAttributes | Modifies the attributes of a file. Used for operations such as changing the ownership, permissions or access times, as well as for truncating a file.
Public Method | Start | Starts a worker thread on which the specified delegate function executes.
Public Method | ToString | (Inherited from System.ComponentModel.Component)
Top

Protected Methods

 | Name | Description
Protected Method | Finalize | (Inherited from System.ComponentModel.Component)
Protected Method | GetService | (Inherited from System.ComponentModel.Component)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | OnError | Raises the Error event. (Inherited from Dart.Ssh.ComponentBase)
Protected Method | OnLog | Raises the Log event. (Inherited from Dart.Ssh.SshConnection)
Protected Method | OnStateChanged | Overridden. Overrides SshConnection.OnStateChanged.
Protected Method | OnUserState | Raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Top

See Also

Reference

Sftp Class
Dart.Ssh Namespace


Abort Method

[image]
PowerTCP SSH and SFTP for .NET
Abort Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : Abort Method

Glossary Item Box

Requests cancellation of any on-going copy operations.

Syntax

Visual Basic (Declaration)
Public Sub Abort()
Visual Basic (Usage) Copy Code
Dim instance As Sftp

instance.Abort()
C#
public void Abort()
Managed Extensions for C++
public: void Abort();
C++/CLI
public:
void Abort();

See Also

Reference

Sftp Class
Sftp Members


ChangeWorkingDirectory Method

[image]
PowerTCP SSH and SFTP for .NET
ChangeWorkingDirectory Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : ChangeWorkingDirectory Method

path
Specifies the desired directory. "." has no effect. ".." can be used to move up one directory. Relative and absolute directories are supported. Use "/" as a delimiter.

Glossary Item Box

Changes the working directory.

Syntax

Visual Basic (Declaration)
Public Sub ChangeWorkingDirectory( _
   ByVal path As String _
)
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim path As String

instance.ChangeWorkingDirectory(path)
C#
public void ChangeWorkingDirectory(
   string path
)
Managed Extensions for C++
public: void ChangeWorkingDirectory(
   string* path
)
C++/CLI
public:
void ChangeWorkingDirectory(
   String^ path
)

Parameters

path
Specifies the desired directory. "." has no effect. ".." can be used to move up one directory. Relative and absolute directories are supported. Use "/" as a delimiter.

Remarks

The new working directory is available in the WorkingDirectory property.When relative filenames and paths are provided to methods in the Sftp class, the value of the WorkingDirectory property is prepended to provided values to create absolute paths for all SFTP server commands.This method only changes the value of the WorkingDirectory property, and does not communicate with the Sftp server.

See Also

Reference

Sftp Class
Sftp Members


Close Method

[image]
PowerTCP SSH and SFTP for .NET
Close Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : Close Method

Glossary Item Box

Closes this SFTP session.

Syntax

Visual Basic (Declaration)
Public Overrides Sub Close()
Visual Basic (Usage) Copy Code
Dim instance As Sftp

instance.Close()
C#
public override void Close()
Managed Extensions for C++
public: void Close(); override
C++/CLI
public:
void Close(); override

Remarks

Do not forget to call this method to free up resources - even if you got an exception from one of the other methods. Sometimes these other methods may throw an exception, saying that the underlying channel is closed (this can happen, e.g., if the other server sent a close message.) However, as long as you have not called the Close method, you may waste resources.

See Also

Reference

Sftp Class
Sftp Members


CreateDirectory Method

[image]
PowerTCP SSH and SFTP for .NET
CreateDirectory Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : CreateDirectory Method

path
The absolute or relative (to WorkingDirectory) path of the directory to be created.
posixPermissions
The permissions for this directory, e.g., "0700" (which must be given as 0x1c0 - C# does not support constants in octal notation).

Glossary Item Box

Creates a new directory.

Syntax

Visual Basic (Declaration)
Public Sub CreateDirectory( _
   ByVal path As String, _
   ByVal posixPermissions As Integer _
)
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim path As String
Dim posixPermissions As Integer

instance.CreateDirectory(path, posixPermissions)
C#
public void CreateDirectory(
   string path,
   int posixPermissions
)
Managed Extensions for C++
public: void CreateDirectory(
   string* path,
   int posixPermissions
)
C++/CLI
public:
void CreateDirectory(
   String^ path,
   int posixPermissions
)

Parameters

path
The absolute or relative (to WorkingDirectory) path of the directory to be created.
posixPermissions
The permissions for this directory, e.g., "0700" (which must be given as 0x1c0 - C# does not support constants in octal notation).

See Also

Reference

Sftp Class
Sftp Members


CreateLink Method

[image]
PowerTCP SSH and SFTP for .NET
CreateLink Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : CreateLink Method

linkPath
The absolute or relative (to WorkingDirectory) path of the link to be created.
targetPath
The absolute or relative (to WorkingDirectory) path of the target.

Glossary Item Box

Creates a symbolic link on the server. Creates a link "linkPath" that points to a target file or directory "targetPath".

Syntax

Visual Basic (Declaration)
Public Sub CreateLink( _
   ByVal linkPath As String, _
   ByVal targetPath As String _
)
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim linkPath As String
Dim targetPath As String

instance.CreateLink(linkPath, targetPath)
C#
public void CreateLink(
   string linkPath,
   string targetPath
)
Managed Extensions for C++
public: void CreateLink(
   string* linkPath,
   string* targetPath
)
C++/CLI
public:
void CreateLink(
   String^ linkPath,
   String^ targetPath
)

Parameters

linkPath
The absolute or relative (to WorkingDirectory) path of the link to be created.
targetPath
The absolute or relative (to WorkingDirectory) path of the target.

See Also

Reference

Sftp Class
Sftp Members


Dispose Method

[image]
PowerTCP SSH and SFTP for .NET
Dispose Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : Dispose Method

Glossary Item Box

Releases all resources associated with the object.

Overload List

Overload | Description
Dispose(Boolean) | Releases all resources associated with the object.
Dispose() | (Inherited from System.ComponentModel.Component)

See Also

Reference

Sftp Class
Sftp Members


Dispose(Boolean) Method

[image]
PowerTCP SSH and SFTP for .NET
Dispose(Boolean) Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class > Dispose Method : Dispose(Boolean) Method

disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.

Glossary Item Box

Releases all resources associated with the object.

Syntax

Visual Basic (Declaration)
Protected Overloads Overrides Sub Dispose( _
   ByVal disposing As Boolean _
)
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim disposing As Boolean

instance.Dispose(disposing)
C#
protected override void Dispose(
   bool disposing
)
Managed Extensions for C++
protected: void Dispose(
   bool disposing
) override
C++/CLI
protected:
void Dispose(
   bool disposing
) override

Parameters

disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.

See Also

Reference

Sftp Class
Sftp Members
Overload List


Get Method

[image]
PowerTCP SSH and SFTP for .NET
Get Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : Get Method

Glossary Item Box

Initiates a file copy from the remote server to the local client.

Overload List

Overload | Description
Get(String,Int64) | Initiates a file copy from the remote server to the local client.
Get(String,String,CopyMode) | Copies a file from the remote server to the local client.
Get(String,String,CopyMode,Object) | Copies a file from the remote server to the local client.
Get(String,String,Boolean,Boolean,CopyMode) | Sequentially copies multiple files from the remote server to the local client.
Get(String,String,Boolean,Boolean,CopyMode,Object) | Sequentially copies multiple files from the remote server to the local client.

See Also

Reference

Sftp Class
Sftp Members


Get(String,Int64) Method

[image]
PowerTCP SSH and SFTP for .NET
Get(String,Int64) Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class > Get Method : Get(String,Int64) Method

fileName
An absolute or relative (from WorkingDirectory) path specifying the source file on the server. Use "/" as the directory delimiter.
offset
The offset into the file from which the copy will start.

Glossary Item Box

Initiates a file copy from the remote server to the local client.

Syntax

Visual Basic (Declaration)
Public Overloads Function Get( _
   ByVal fileName As String, _
   ByVal offset As Long _
) As Stream
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim fileName As String
Dim offset As Long
Dim value As Stream

value = instance.Get(fileName, offset)
C#
public Stream Get(
   string fileName,
   long offset
)
Managed Extensions for C++
public: Stream* Get(
   string* fileName,
   long offset
)
C++/CLI
public:
Stream^ Get(
   String^ fileName,
   int64 offset
)

Parameters

fileName
An absolute or relative (from WorkingDirectory) path specifying the source file on the server. Use "/" as the directory delimiter.
offset
The offset into the file from which the copy will start.

Return Value

A Stream that should be read from and subsequently closed.

Remarks

This method and operations on the returned stream will not raise the Progress event. This method is not thread-safe.

See Also

Reference

Sftp Class
Sftp Members
Overload List


Get(String,String,CopyMode) Method

[image]
PowerTCP SSH and SFTP for .NET
Get(String,String,CopyMode) Method
See Also Example Send comments on this topic
Dart.Ssh Namespace > Sftp Class > Get Method : Get(String,String,CopyMode) Method

remoteFileName
An absolute or relative (from WorkingDirectory) path specifying the file on the server. Use "/" as the directory delimiter.
localFileName
An absolute or relative (from the current working directory) path specifying the file on the client.
mode
Specifies the type of copy to perform.

Glossary Item Box

Copies a file from the remote server to the local client.

Syntax

Visual Basic (Declaration)
Public Overloads Function Get( _
   ByVal remoteFileName As String, _
   ByVal localFileName As String, _
   ByVal mode As CopyMode _
) As CopyResult
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim remoteFileName As String
Dim localFileName As String
Dim mode As CopyMode
Dim value As CopyResult

value = instance.Get(remoteFileName, localFileName, mode)
C#
public CopyResult Get(
   string remoteFileName,
   string localFileName,
   CopyMode mode
)
Managed Extensions for C++
public: CopyResult* Get(
   string* remoteFileName,
   string* localFileName,
   CopyMode mode
)
C++/CLI
public:
CopyResult^ Get(
   String^ remoteFileName,
   String^ localFileName,
   CopyMode mode
)

Parameters

remoteFileName
An absolute or relative (from WorkingDirectory) path specifying the file on the server. Use "/" as the directory delimiter.
localFileName
An absolute or relative (from the current working directory) path specifying the file on the client.
mode
Specifies the type of copy to perform.

Remarks

The Progress event is raised as this method executes if an event handler is attached.

If Sftp.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Progress event is raised containing the result upon completion, or the Error event is raised if an exception is thrown.

Example

The example below demonstrates how to Get a file.
C# Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
    //Connect and log into the server
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword);
    //Download the file
    sftp1.Get(remoteFilename, localSaveLocation, CopyMode.Copy);
    //Logout and close the connection.
    sftp1.Close();
}

private void connectAndLogin(string hostNameOrAddress, int port, string username, string password)
{
    //Connect to the server
    sftp1.Connection.RemoteEndPoint.HostNameOrAddress = hostNameOrAddress;
    sftp1.Connection.RemoteEndPoint.Port = port; //Usually 22
    sftp1.Connect();

    //Authenticate
    SshLoginData loginDetails = new SshLoginData();
    loginDetails.Username = username;
    loginDetails.Password = password;
    sftp1.Authenticate(loginDetails);
}
Visual Basic Copy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    'Connect and log into the server
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword)
    'Download the file
    sftp1.Get(remoteFilename, localSaveLocation, CopyMode.Copy)
    'Logout and close the connection.
    sftp1.Close()
End Sub

Private Sub connectAndLogin(ByVal hostNameOrAddress As String, ByVal port As Integer, ByVal username As String, ByVal password As String)
    'Connect to the server
    sftp1.Connection.RemoteEndPoint.HostNameOrAddress = hostNameOrAddress
    sftp1.Connection.RemoteEndPoint.Port = port 'Usually 22
    sftp1.Connect()

    'Authenticate
    Dim loginDetails As New SshLoginData()
    loginDetails.Username = username
    loginDetails.Password = password
    sftp1.Authenticate(loginDetails)
End Sub

See Also

Reference

Sftp Class
Sftp Members
Overload List


Get(String,String,CopyMode,Object) Method

[image]
PowerTCP SSH and SFTP for .NET
Get(String,String,CopyMode,Object) Method
See Also Example Send comments on this topic
Dart.Ssh Namespace > Sftp Class > Get Method : Get(String,String,CopyMode,Object) Method

remoteFileName
An absolute or relative (from WorkingDirectory) path specifying the file on the server. Use "/" as the directory delimiter.
localFileName
An absolute or relative (from the current working directory) path specifying the file on the client.
mode
Specifies the type of copy to perform.
userToken
An object that can be used to identify this copy operation when the progress event is raised during multiple concurrent copy operations.

Glossary Item Box

Copies a file from the remote server to the local client.

Syntax

Visual Basic (Declaration)
Public Overloads Function Get( _
   ByVal remoteFileName As String, _
   ByVal localFileName As String, _
   ByVal mode As CopyMode, _
   ByVal userToken As Object _
) As CopyResult
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim remoteFileName As String
Dim localFileName As String
Dim mode As CopyMode
Dim userToken As Object
Dim value As CopyResult

value = instance.Get(remoteFileName, localFileName, mode, userToken)
C#
public CopyResult Get(
   string remoteFileName,
   string localFileName,
   CopyMode mode,
   object userToken
)
Managed Extensions for C++
public: CopyResult* Get(
   string* remoteFileName,
   string* localFileName,
   CopyMode mode,
   Object* userToken
)
C++/CLI
public:
CopyResult^ Get(
   String^ remoteFileName,
   String^ localFileName,
   CopyMode mode,
   Object^ userToken
)

Parameters

remoteFileName
An absolute or relative (from WorkingDirectory) path specifying the file on the server. Use "/" as the directory delimiter.
localFileName
An absolute or relative (from the current working directory) path specifying the file on the client.
mode
Specifies the type of copy to perform.
userToken
An object that can be used to identify this copy operation when the progress event is raised during multiple concurrent copy operations.

Remarks

The Progress event is raised as this method executes if an event handler is attached.

If Sftp.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Progress event is raised containing the result upon completion, or the Error event is raised if an exception is thrown.

Example

The example below demonstrates how to Get a file.
C# Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
    //Connect and log into the server
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword);
    //Download the file
    sftp1.Get(remoteFilename, localSaveLocation, CopyMode.Copy);
    //Logout and close the connection.
    sftp1.Close();
}

private void connectAndLogin(string hostNameOrAddress, int port, string username, string password)
{
    //Connect to the server
    sftp1.Connection.RemoteEndPoint.HostNameOrAddress = hostNameOrAddress;
    sftp1.Connection.RemoteEndPoint.Port = port; //Usually 22
    sftp1.Connect();

    //Authenticate
    SshLoginData loginDetails = new SshLoginData();
    loginDetails.Username = username;
    loginDetails.Password = password;
    sftp1.Authenticate(loginDetails);
}
Visual Basic Copy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    'Connect and log into the server
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword)
    'Download the file
    sftp1.Get(remoteFilename, localSaveLocation, CopyMode.Copy)
    'Logout and close the connection.
    sftp1.Close()
End Sub

Private Sub connectAndLogin(ByVal hostNameOrAddress As String, ByVal port As Integer, ByVal username As String, ByVal password As String)
    'Connect to the server
    sftp1.Connection.RemoteEndPoint.HostNameOrAddress = hostNameOrAddress
    sftp1.Connection.RemoteEndPoint.Port = port 'Usually 22
    sftp1.Connect()

    'Authenticate
    Dim loginDetails As New SshLoginData()
    loginDetails.Username = username
    loginDetails.Password = password
    sftp1.Authenticate(loginDetails)
End Sub

See Also

Reference

Sftp Class
Sftp Members
Overload List


Get(String,String,Boolean,Boolean,CopyMode) Method

[image]
PowerTCP SSH and SFTP for .NET
Get(String,String,Boolean,Boolean,CopyMode) Method
See Also Example Send comments on this topic
Dart.Ssh Namespace > Sftp Class > Get Method : Get(String,String,Boolean,Boolean,CopyMode) Method

remoteSearchPattern
An absolute or relative (from WorkingDirectory) path specifying the search pattern on the server. Must contain a wildcard (*).
localDirectory
An absolute or relative (from the current working directory) path specifying the destination root directory on the client.
recurse
Specify true to search sub-directories resursively.
includeEmptyFolders
Specify true to include empty folders in the results.
mode
Specifies the type of copy to perform.

Glossary Item Box

Sequentially copies multiple files from the remote server to the local client.

Syntax

Visual Basic (Declaration)
Public Overloads Function Get( _
   ByVal remoteSearchPattern As String, _
   ByVal localDirectory As String, _
   ByVal recurse As Boolean, _
   ByVal includeEmptyFolders As Boolean, _
   ByVal mode As CopyMode _
) As CopyResult()
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim remoteSearchPattern As String
Dim localDirectory As String
Dim recurse As Boolean
Dim includeEmptyFolders As Boolean
Dim mode As CopyMode
Dim value() As CopyResult

value = instance.Get(remoteSearchPattern, localDirectory, recurse, includeEmptyFolders, mode)
C#
public CopyResult[] Get(
   string remoteSearchPattern,
   string localDirectory,
   bool recurse,
   bool includeEmptyFolders,
   CopyMode mode
)
Managed Extensions for C++
public: CopyResult*[]* Get(
   string* remoteSearchPattern,
   string* localDirectory,
   bool recurse,
   bool includeEmptyFolders,
   CopyMode mode
)
C++/CLI
public:
array<CopyResult^>^ Get(
   String^ remoteSearchPattern,
   String^ localDirectory,
   bool recurse,
   bool includeEmptyFolders,
   CopyMode mode
)

Parameters

remoteSearchPattern
An absolute or relative (from WorkingDirectory) path specifying the search pattern on the server. Must contain a wildcard (*).
localDirectory
An absolute or relative (from the current working directory) path specifying the destination root directory on the client.
recurse
Specify true to search sub-directories resursively.
includeEmptyFolders
Specify true to include empty folders in the results.
mode
Specifies the type of copy to perform.

Exceptions

Exception | Description
System.ArgumentException | Thrown if the remoteSearchPattern does not contain a wildcard character (*).

Remarks

This method will only raise an exception if the remoteSearchPattern is invalid. For exceptions that occurred during execution, check CopyResult.GetException() of each returned CopyResult.

The Progress event is raised as this method executes if an event handler is attached.

If Sftp.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Progress event is raised containing the result upon completion.

Example

The example below demonstrates how to Get all files and directories under a directory.
C# Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
    //Connect and log into the server
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword);
    //Download files that match the search pattern
    //If remoteSearchPattern is "MyFiles/*" it will download all files and folders under 'MyFiles'
    CopyResult[] copyResults = sftp1.Get(remoteSearchPattern, localSaveDir, true, true, CopyMode.Copy);
    //Logout and close the connection.
    sftp1.Close();
}

private void connectAndLogin(string hostNameOrAddress, int port, string username, string password)
{
    //Connect to the server
    sftp1.Connection.RemoteEndPoint.HostNameOrAddress = hostNameOrAddress;
    sftp1.Connection.RemoteEndPoint.Port = port; //Usually 22
    sftp1.Connect();

    //Authenticate
    SshLoginData loginDetails = new SshLoginData();
    loginDetails.Username = username;
    loginDetails.Password = password;
    sftp1.Authenticate(loginDetails);
}
Visual Basic Copy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    'Connect and log into the server
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword)
    'Download files that match the search pattern
    'If remoteSearchPattern is "MyFiles/*" it will download all files and folders under 'MyFiles'
    Dim copyResults() As CopyResult = sftp1.Get(remoteSearchPattern, localSaveDir, True, True, CopyMode.Copy)
    'Logout and close the connection.
    sftp1.Close()
End Sub

Private Sub connectAndLogin(ByVal hostNameOrAddress As String, ByVal port As Integer, ByVal username As String, ByVal password As String)
    'Connect to the server
    sftp1.Connection.RemoteEndPoint.HostNameOrAddress = hostNameOrAddress
    sftp1.Connection.RemoteEndPoint.Port = port 'Usually 22
    sftp1.Connect()

    'Authenticate
    Dim loginDetails As New SshLoginData()
    loginDetails.Username = username
    loginDetails.Password = password
    sftp1.Authenticate(loginDetails)
End Sub

See Also

Reference

Sftp Class
Sftp Members
Overload List


Get(String,String,Boolean,Boolean,CopyMode,Object) Method

[image]
PowerTCP SSH and SFTP for .NET
Get(String,String,Boolean,Boolean,CopyMode,Object) Method
See Also Example Send comments on this topic
Dart.Ssh Namespace > Sftp Class > Get Method : Get(String,String,Boolean,Boolean,CopyMode,Object) Method

remoteSearchPattern
An absolute or relative (from WorkingDirectory) path specifying the search pattern on the server. Must contain a wildcard (*).
localDirectory
An absolute or relative (from the current working directory) path specifying the destination root directory on the client.
recurse
Specify true to search sub-directories resursively.
includeEmptyFolders
Specify true to include empty folders in the results.
mode
Specifies the type of copy to perform.
userToken
An object that can be used to identify this copy operation when the progress event is raised during multiple concurrent copy operations.

Glossary Item Box

Sequentially copies multiple files from the remote server to the local client.

Syntax

Visual Basic (Declaration)
Public Overloads Function Get( _
   ByVal remoteSearchPattern As String, _
   ByVal localDirectory As String, _
   ByVal recurse As Boolean, _
   ByVal includeEmptyFolders As Boolean, _
   ByVal mode As CopyMode, _
   ByVal userToken As Object _
) As CopyResult()
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim remoteSearchPattern As String
Dim localDirectory As String
Dim recurse As Boolean
Dim includeEmptyFolders As Boolean
Dim mode As CopyMode
Dim userToken As Object
Dim value() As CopyResult

value = instance.Get(remoteSearchPattern, localDirectory, recurse, includeEmptyFolders, mode, userToken)
C#
public CopyResult[] Get(
   string remoteSearchPattern,
   string localDirectory,
   bool recurse,
   bool includeEmptyFolders,
   CopyMode mode,
   object userToken
)
Managed Extensions for C++
public: CopyResult*[]* Get(
   string* remoteSearchPattern,
   string* localDirectory,
   bool recurse,
   bool includeEmptyFolders,
   CopyMode mode,
   Object* userToken
)
C++/CLI
public:
array<CopyResult^>^ Get(
   String^ remoteSearchPattern,
   String^ localDirectory,
   bool recurse,
   bool includeEmptyFolders,
   CopyMode mode,
   Object^ userToken
)

Parameters

remoteSearchPattern
An absolute or relative (from WorkingDirectory) path specifying the search pattern on the server. Must contain a wildcard (*).
localDirectory
An absolute or relative (from the current working directory) path specifying the destination root directory on the client.
recurse
Specify true to search sub-directories resursively.
includeEmptyFolders
Specify true to include empty folders in the results.
mode
Specifies the type of copy to perform.
userToken
An object that can be used to identify this copy operation when the progress event is raised during multiple concurrent copy operations.

Exceptions

Exception | Description
System.ArgumentException | Thrown if the remoteSearchPattern does not contain a wildcard character (*).

Remarks

This method will only raise an exception if the remoteSearchPattern is invalid. For exceptions that occurred during execution, check CopyResult.GetException() of each returned CopyResult.

The Progress event is raised as this method executes if an event handler is attached.

If Sftp.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Progress event is raised containing the result upon completion.

Example

The example below demonstrates how to Get all files and directories under a directory.
C# Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
    //Connect and log into the server
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword);
    //Download files that match the search pattern
    //If remoteSearchPattern is "MyFiles/*" it will download all files and folders under 'MyFiles'
    CopyResult[] copyResults = sftp1.Get(remoteSearchPattern, localSaveDir, true, true, CopyMode.Copy);
    //Logout and close the connection.
    sftp1.Close();
}

private void connectAndLogin(string hostNameOrAddress, int port, string username, string password)
{
    //Connect to the server
    sftp1.Connection.RemoteEndPoint.HostNameOrAddress = hostNameOrAddress;
    sftp1.Connection.RemoteEndPoint.Port = port; //Usually 22
    sftp1.Connect();

    //Authenticate
    SshLoginData loginDetails = new SshLoginData();
    loginDetails.Username = username;
    loginDetails.Password = password;
    sftp1.Authenticate(loginDetails);
}
Visual Basic Copy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    'Connect and log into the server
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword)
    'Download files that match the search pattern
    'If remoteSearchPattern is "MyFiles/*" it will download all files and folders under 'MyFiles'
    Dim copyResults() As CopyResult = sftp1.Get(remoteSearchPattern, localSaveDir, True, True, CopyMode.Copy)
    'Logout and close the connection.
    sftp1.Close()
End Sub

Private Sub connectAndLogin(ByVal hostNameOrAddress As String, ByVal port As Integer, ByVal username As String, ByVal password As String)
    'Connect to the server
    sftp1.Connection.RemoteEndPoint.HostNameOrAddress = hostNameOrAddress
    sftp1.Connection.RemoteEndPoint.Port = port 'Usually 22
    sftp1.Connect()

    'Authenticate
    Dim loginDetails As New SshLoginData()
    loginDetails.Username = username
    loginDetails.Password = password
    sftp1.Authenticate(loginDetails)
End Sub

See Also

Reference

Sftp Class
Sftp Members
Overload List


GetAttributes Method

[image]
PowerTCP SSH and SFTP for .NET
GetAttributes Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : GetAttributes Method

path
The absolute or relative (to WorkingDirectory) path of the file or directory.
followLink
If true, the SFTP stat command is used (which follows links), otherwise the SFTP lstat command is used (which return attributes of the link itself).

Glossary Item Box

Gets the file attributes of a file. This method follows symbolic links on the server.

Syntax

Visual Basic (Declaration)
Public Function GetAttributes( _
   ByVal path As String, _
   ByVal followLink As Boolean _
) As SftpFileAttributes
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim path As String
Dim followLink As Boolean
Dim value As SftpFileAttributes

value = instance.GetAttributes(path, followLink)
C#
public SftpFileAttributes GetAttributes(
   string path,
   bool followLink
)
Managed Extensions for C++
public: SftpFileAttributes* GetAttributes(
   string* path,
   bool followLink
)
C++/CLI
public:
SftpFileAttributes^ GetAttributes(
   String^ path,
   bool followLink
)

Parameters

path
The absolute or relative (to WorkingDirectory) path of the file or directory.
followLink
If true, the SFTP stat command is used (which follows links), otherwise the SFTP lstat command is used (which return attributes of the link itself).

Return Value

An SftpFileAttributes object.

See Also

Reference

Sftp Class
Sftp Members


GetTarget Method

[image]
PowerTCP SSH and SFTP for .NET
GetTarget Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : GetTarget Method

linkPath
The absolute or relative (to WorkingDirectory) path of the symbolic link.

Glossary Item Box

Gets the target of a symbolic link.

Syntax

Visual Basic (Declaration)
Public Function GetTarget( _
   ByVal linkPath As String _
) As String
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim linkPath As String
Dim value As String

value = instance.GetTarget(linkPath)
C#
public string GetTarget(
   string linkPath
)
Managed Extensions for C++
public: string* GetTarget(
   string* linkPath
)
C++/CLI
public:
String^ GetTarget(
   String^ linkPath
)

Parameters

linkPath
The absolute or relative (to WorkingDirectory) path of the symbolic link.

Return Value

The absolute path of the target of the link.

See Also

Reference

Sftp Class
Sftp Members


List Method

[image]
PowerTCP SSH and SFTP for .NET
List Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : List Method

directoryPath
The absolute or relative (to WorkingDirectory) path of a directory.

Glossary Item Box

Lists the contents of a directory.

Syntax

Visual Basic (Declaration)
Public Function List( _
   ByVal directoryPath As String _
) As List(Of ListEntry)
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim directoryPath As String
Dim value As List(Of ListEntry)

value = instance.List(directoryPath)
C#
public List<ListEntry> List(
   string directoryPath
)
Managed Extensions for C++
public: List<ListEntry*>* List(
   string* directoryPath
)
C++/CLI
public:
List<ListEntry^>^ List(
   String^ directoryPath
)

Parameters

directoryPath
The absolute or relative (to WorkingDirectory) path of a directory.

Return Value

A list of ListEntry objects.

See Also

Reference

Sftp Class
Sftp Members


ListEx Method

[image]
PowerTCP SSH and SFTP for .NET
ListEx Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : ListEx Method

directoryPath
The absolute or relative (to WorkingDirectory) path of a directory.

Glossary Item Box

Lists the contents of a directory for COM environments.

Syntax

Visual Basic (Declaration)
Public Function ListEx( _
   ByVal directoryPath As String _
) As ArrayList
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim directoryPath As String
Dim value As ArrayList

value = instance.ListEx(directoryPath)
C#
public ArrayList ListEx(
   string directoryPath
)
Managed Extensions for C++
public: ArrayList* ListEx(
   string* directoryPath
)
C++/CLI
public:
ArrayList^ ListEx(
   String^ directoryPath
)

Parameters

directoryPath
The absolute or relative (to WorkingDirectory) path of a directory.

Return Value

An ArrayList of ListEntry objects.

See Also

Reference

Sftp Class
Sftp Members


OnProgress Method

[image]
PowerTCP SSH and SFTP for .NET
OnProgress Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : OnProgress Method

e
A ProgressEventArgs that contains the event data.

Glossary Item Box

Raises the Progress event.

Syntax

Visual Basic (Declaration)
Public Overridable Sub OnProgress( _
   ByVal e As ProgressEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim e As ProgressEventArgs

instance.OnProgress(e)
C#
public virtual void OnProgress(
   ProgressEventArgs e
)
Managed Extensions for C++
public: virtual void OnProgress(
   ProgressEventArgs* e
)
C++/CLI
public:
virtual void OnProgress(
   ProgressEventArgs^ e
)

Parameters

e
A ProgressEventArgs that contains the event data.

Remarks

Raising an event invokes the event handler through a delegate. The OnProgress method will be called on the same thread the copy operation is using.

The OnProgress method allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Note to Inheritors: When overriding OnProgress in a derived class, be sure to call the base class OnProgress method so that registered delegates receive the event.

See the ComponentBase.SynchronizingObject property for important information on updating UI controls from within derived classes.

See Also

Reference

Sftp Class
Sftp Members


OnStateChanged Method

[image]
PowerTCP SSH and SFTP for .NET
OnStateChanged Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : OnStateChanged Method

e
An EventArgs that contains the event data.

Glossary Item Box

Overrides SshConnection.OnStateChanged.

Syntax

Visual Basic (Declaration)
Protected Overrides Sub OnStateChanged( _
   ByVal e As BaseEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim e As BaseEventArgs

instance.OnStateChanged(e)
C#
protected override void OnStateChanged(
   BaseEventArgs e
)
Managed Extensions for C++
protected: void OnStateChanged(
   BaseEventArgs* e
) override
C++/CLI
protected:
void OnStateChanged(
   BaseEventArgs^ e
) override

Parameters

e
An EventArgs that contains the event data.

Remarks

Once active, the Sftp component populates the WorkingDirectory property before calling the SshConnection.OnStateChanged method.

See Also

Reference

Sftp Class
Sftp Members


Put Method

[image]
PowerTCP SSH and SFTP for .NET
Put Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : Put Method

Glossary Item Box

Initiates a file copy from the local client to the remote server.

Overload List

Overload | Description
Put(String,Int64) | Initiates a file copy from the local client to the remote server.
Put(String,String,CopyMode) | Copies a file from the local client to the remote server.
Put(String,String,CopyMode,Object) | Copies a file from the local client to the remote server.
Put(String,String,Boolean,Boolean,CopyMode) | Sequentially copies multiple files from the local client to the remote server.
Put(String,String,Boolean,Boolean,CopyMode,Object) | Sequentially copies multiple files from the local client to the remote server.

See Also

Reference

Sftp Class
Sftp Members


Put(String,Int64) Method

[image]
PowerTCP SSH and SFTP for .NET
Put(String,Int64) Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class > Put Method : Put(String,Int64) Method

fileName
An absolute or relative (from the current working directory) path specifying the destination on the server. Use "/" as the directory delimiter.
offset
The offset into the file from which the copy will start.

Glossary Item Box

Initiates a file copy from the local client to the remote server.

Syntax

Visual Basic (Declaration)
Public Overloads Function Put( _
   ByVal fileName As String, _
   ByVal offset As Long _
) As Stream
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim fileName As String
Dim offset As Long
Dim value As Stream

value = instance.Put(fileName, offset)
C#
public Stream Put(
   string fileName,
   long offset
)
Managed Extensions for C++
public: Stream* Put(
   string* fileName,
   long offset
)
C++/CLI
public:
Stream^ Put(
   String^ fileName,
   int64 offset
)

Parameters

fileName
An absolute or relative (from the current working directory) path specifying the destination on the server. Use "/" as the directory delimiter.
offset
The offset into the file from which the copy will start.

Return Value

A Stream that should be written to and subsequently closed.

Remarks

This method and operations on the returned stream will not raise the Progress event.

See Also

Reference

Sftp Class
Sftp Members
Overload List


Put(String,String,CopyMode) Method

[image]
PowerTCP SSH and SFTP for .NET
Put(String,String,CopyMode) Method
See Also Example Send comments on this topic
Dart.Ssh Namespace > Sftp Class > Put Method : Put(String,String,CopyMode) Method

localFileName
An absolute or relative (from the current working directory) path specifying the file on the client.
remoteFileName
An absolute or relative (from WorkingDirectory) path specifying the file on the server. Use "/" as the directory delimiter.
mode
Specifies the type of copy to perform.

Glossary Item Box

Copies a file from the local client to the remote server.

Syntax

Visual Basic (Declaration)
Public Overloads Function Put( _
   ByVal localFileName As String, _
   ByVal remoteFileName As String, _
   ByVal mode As CopyMode _
) As CopyResult
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim localFileName As String
Dim remoteFileName As String
Dim mode As CopyMode
Dim value As CopyResult

value = instance.Put(localFileName, remoteFileName, mode)
C#
public CopyResult Put(
   string localFileName,
   string remoteFileName,
   CopyMode mode
)
Managed Extensions for C++
public: CopyResult* Put(
   string* localFileName,
   string* remoteFileName,
   CopyMode mode
)
C++/CLI
public:
CopyResult^ Put(
   String^ localFileName,
   String^ remoteFileName,
   CopyMode mode
)

Parameters

localFileName
An absolute or relative (from the current working directory) path specifying the file on the client.
remoteFileName
An absolute or relative (from WorkingDirectory) path specifying the file on the server. Use "/" as the directory delimiter.
mode
Specifies the type of copy to perform.

Remarks

If remoteFileName includes a path or part of a path that must be created on the server, Put(String,String,Boolean,Boolean,CopyMode) may be used to automatically create the folder structure on the server.

The Progress event is raised as this method executes if an event handler is attached.

If Sftp.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Progress event is raised containing the result upon completion, or the Error event is raised if an exception is thrown.

Example

The example below demonstrates how to Put a file.
C# Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
    //Connect and log into the server
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword);
    //Upload the file
    sftp1.Put(localFilepath, remoteFilename, CopyMode.Copy);
    //Logout and close the connection.
    sftp1.Close();
}

private void connectAndLogin(string hostNameOrAddress, int port, string username, string password)
{
    //Connect to the server
    sftp1.Connection.RemoteEndPoint.HostNameOrAddress = hostNameOrAddress;
    sftp1.Connection.RemoteEndPoint.Port = port; //Usually 22
    sftp1.Connect();

    //Authenticate
    SshLoginData loginDetails = new SshLoginData();
    loginDetails.Username = username;
    loginDetails.Password = password;
    sftp1.Authenticate(loginDetails);
}
Visual Basic Copy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    'Connect and log into the server
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword)
    'Upload the file
    sftp1.Put(localFilepath, remoteFilename, CopyMode.Copy)
    'Logout and close the connection.
    sftp1.Close()
End Sub

Private Sub connectAndLogin(ByVal hostNameOrAddress As String, ByVal port As Integer, ByVal username As String, ByVal password As String)
    'Connect to the server
    sftp1.Connection.RemoteEndPoint.HostNameOrAddress = hostNameOrAddress
    sftp1.Connection.RemoteEndPoint.Port = port 'Usually 22
    sftp1.Connect()

    'Authenticate
    Dim loginDetails As New SshLoginData()
    loginDetails.Username = username
    loginDetails.Password = password
    sftp1.Authenticate(loginDetails)
End Sub

See Also

Reference

Sftp Class
Sftp Members
Overload List


Put(String,String,CopyMode,Object) Method

[image]
PowerTCP SSH and SFTP for .NET
Put(String,String,CopyMode,Object) Method
See Also Example Send comments on this topic
Dart.Ssh Namespace > Sftp Class > Put Method : Put(String,String,CopyMode,Object) Method

localFileName
An absolute or relative (from the current working directory) path specifying the file on the client.
remoteFileName
An absolute or relative (from WorkingDirectory) path specifying the file on the server. Use "/" as the directory delimiter.
mode
Specifies the type of copy to perform.
userToken
An object that can be used to identify this copy operation when the progress event is raised during multiple concurrent copy operations.

Glossary Item Box

Copies a file from the local client to the remote server.

Syntax

Visual Basic (Declaration)
Public Overloads Function Put( _
   ByVal localFileName As String, _
   ByVal remoteFileName As String, _
   ByVal mode As CopyMode, _
   ByVal userToken As Object _
) As CopyResult
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim localFileName As String
Dim remoteFileName As String
Dim mode As CopyMode
Dim userToken As Object
Dim value As CopyResult

value = instance.Put(localFileName, remoteFileName, mode, userToken)
C#
public CopyResult Put(
   string localFileName,
   string remoteFileName,
   CopyMode mode,
   object userToken
)
Managed Extensions for C++
public: CopyResult* Put(
   string* localFileName,
   string* remoteFileName,
   CopyMode mode,
   Object* userToken
)
C++/CLI
public:
CopyResult^ Put(
   String^ localFileName,
   String^ remoteFileName,
   CopyMode mode,
   Object^ userToken
)

Parameters

localFileName
An absolute or relative (from the current working directory) path specifying the file on the client.
remoteFileName
An absolute or relative (from WorkingDirectory) path specifying the file on the server. Use "/" as the directory delimiter.
mode
Specifies the type of copy to perform.
userToken
An object that can be used to identify this copy operation when the progress event is raised during multiple concurrent copy operations.

Remarks

If remoteFileName includes a path or part of a path that must be created on the server, Put(String,String,Boolean,Boolean,CopyMode) may be used to automatically create the folder structure on the server.

The Progress event is raised as this method executes if an event handler is attached.

If Sftp.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Progress event is raised containing the result upon completion, or the Error event is raised if an exception is thrown.

Example

The example below demonstrates how to Put a file.
C# Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
    //Connect and log into the server
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword);
    //Upload the file
    sftp1.Put(localFilepath, remoteFilename, CopyMode.Copy);
    //Logout and close the connection.
    sftp1.Close();
}

private void connectAndLogin(string hostNameOrAddress, int port, string username, string password)
{
    //Connect to the server
    sftp1.Connection.RemoteEndPoint.HostNameOrAddress = hostNameOrAddress;
    sftp1.Connection.RemoteEndPoint.Port = port; //Usually 22
    sftp1.Connect();

    //Authenticate
    SshLoginData loginDetails = new SshLoginData();
    loginDetails.Username = username;
    loginDetails.Password = password;
    sftp1.Authenticate(loginDetails);
}
Visual Basic Copy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    'Connect and log into the server
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword)
    'Upload the file
    sftp1.Put(localFilepath, remoteFilename, CopyMode.Copy)
    'Logout and close the connection.
    sftp1.Close()
End Sub

Private Sub connectAndLogin(ByVal hostNameOrAddress As String, ByVal port As Integer, ByVal username As String, ByVal password As String)
    'Connect to the server
    sftp1.Connection.RemoteEndPoint.HostNameOrAddress = hostNameOrAddress
    sftp1.Connection.RemoteEndPoint.Port = port 'Usually 22
    sftp1.Connect()

    'Authenticate
    Dim loginDetails As New SshLoginData()
    loginDetails.Username = username
    loginDetails.Password = password
    sftp1.Authenticate(loginDetails)
End Sub

See Also

Reference

Sftp Class
Sftp Members
Overload List


Put(String,String,Boolean,Boolean,CopyMode) Method

[image]
PowerTCP SSH and SFTP for .NET
Put(String,String,Boolean,Boolean,CopyMode) Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class > Put Method : Put(String,String,Boolean,Boolean,CopyMode) Method

localSearchPattern
An absolute or relative (from the current working directory) path specifying the search pattern on the client. Must contain a wildcard (*).
remoteDirectory
An absolute or relative (from WorkingDirectory) path specifying the destination root directory on the server.
recurse
Specify true to search sub-directories recursively.
includeEmptyFolders
Specify true to include empty folders in the results.
mode
Specifies the type of copy to perform.

Glossary Item Box

Sequentially copies multiple files from the local client to the remote server.

Syntax

Visual Basic (Declaration)
Public Overloads Function Put( _
   ByVal localSearchPattern As String, _
   ByVal remoteDirectory As String, _
   ByVal recurse As Boolean, _
   ByVal includeEmptyFolders As Boolean, _
   ByVal mode As CopyMode _
) As CopyResult()
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim localSearchPattern As String
Dim remoteDirectory As String
Dim recurse As Boolean
Dim includeEmptyFolders As Boolean
Dim mode As CopyMode
Dim value() As CopyResult

value = instance.Put(localSearchPattern, remoteDirectory, recurse, includeEmptyFolders, mode)
C#
public CopyResult[] Put(
   string localSearchPattern,
   string remoteDirectory,
   bool recurse,
   bool includeEmptyFolders,
   CopyMode mode
)
Managed Extensions for C++
public: CopyResult*[]* Put(
   string* localSearchPattern,
   string* remoteDirectory,
   bool recurse,
   bool includeEmptyFolders,
   CopyMode mode
)
C++/CLI
public:
array<CopyResult^>^ Put(
   String^ localSearchPattern,
   String^ remoteDirectory,
   bool recurse,
   bool includeEmptyFolders,
   CopyMode mode
)

Parameters

localSearchPattern
An absolute or relative (from the current working directory) path specifying the search pattern on the client. Must contain a wildcard (*).
remoteDirectory
An absolute or relative (from WorkingDirectory) path specifying the destination root directory on the server.
recurse
Specify true to search sub-directories recursively.
includeEmptyFolders
Specify true to include empty folders in the results.
mode
Specifies the type of copy to perform.

Exceptions

Exception | Description
System.ArgumentException | Thrown if the localSearchPattern does not contain a wildcard character (*).

Remarks

Use this overload to automatically create the folder structure on the server if the file(s) to upload includes a path that needs to be created on the server.

This method will only raise an exception if the localSearchPattern is invalid. For exceptions that occurred during execution, check CopyResult.GetException() of each returned CopyResult.

The Progress event is raised as this method executes if an event handler is attached.

If Sftp.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Progress event is raised containing the result upon completion.

See Also

Reference

Sftp Class
Sftp Members
Overload List


Put(String,String,Boolean,Boolean,CopyMode,Object) Method

[image]
PowerTCP SSH and SFTP for .NET
Put(String,String,Boolean,Boolean,CopyMode,Object) Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class > Put Method : Put(String,String,Boolean,Boolean,CopyMode,Object) Method

localSearchPattern
An absolute or relative (from the current working directory) path specifying the search pattern on the client. Must contain a wildcard (*).
remoteDirectory
An absolute or relative (from WorkingDirectory) path specifying the destination root directory on the server.
recurse
Specify true to search sub-directories recursively.
includeEmptyFolders
Specify true to include empty folders in the results.
mode
Specifies the type of copy to perform.
userToken
An object that can be used to identify this copy operation when the progress event is raised during multiple concurrent copy operations.

Glossary Item Box

Sequentially copies multiple files from the local client to the remote server.

Syntax

Visual Basic (Declaration)
Public Overloads Function Put( _
   ByVal localSearchPattern As String, _
   ByVal remoteDirectory As String, _
   ByVal recurse As Boolean, _
   ByVal includeEmptyFolders As Boolean, _
   ByVal mode As CopyMode, _
   ByVal userToken As Object _
) As CopyResult()
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim localSearchPattern As String
Dim remoteDirectory As String
Dim recurse As Boolean
Dim includeEmptyFolders As Boolean
Dim mode As CopyMode
Dim userToken As Object
Dim value() As CopyResult

value = instance.Put(localSearchPattern, remoteDirectory, recurse, includeEmptyFolders, mode, userToken)
C#
public CopyResult[] Put(
   string localSearchPattern,
   string remoteDirectory,
   bool recurse,
   bool includeEmptyFolders,
   CopyMode mode,
   object userToken
)
Managed Extensions for C++
public: CopyResult*[]* Put(
   string* localSearchPattern,
   string* remoteDirectory,
   bool recurse,
   bool includeEmptyFolders,
   CopyMode mode,
   Object* userToken
)
C++/CLI
public:
array<CopyResult^>^ Put(
   String^ localSearchPattern,
   String^ remoteDirectory,
   bool recurse,
   bool includeEmptyFolders,
   CopyMode mode,
   Object^ userToken
)

Parameters

localSearchPattern
An absolute or relative (from the current working directory) path specifying the search pattern on the client. Must contain a wildcard (*).
remoteDirectory
An absolute or relative (from WorkingDirectory) path specifying the destination root directory on the server.
recurse
Specify true to search sub-directories recursively.
includeEmptyFolders
Specify true to include empty folders in the results.
mode
Specifies the type of copy to perform.
userToken
An object that can be used to identify this copy operation when the progress event is raised during multiple concurrent copy operations.

Exceptions

Exception | Description
System.ArgumentException | Thrown if the localSearchPattern does not contain a wildcard character (*).

Remarks

Use this overload to automatically create the folder structure on the server if the file(s) to upload includes a path that needs to be created on the server.

This method will only raise an exception if the localSearchPattern is invalid. For exceptions that occurred during execution, check CopyResult.GetException() of each returned CopyResult.

The Progress event is raised as this method executes if an event handler is attached.

If Sftp.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Progress event is raised containing the result upon completion.

See Also

Reference

Sftp Class
Sftp Members
Overload List


Remove Method

[image]
PowerTCP SSH and SFTP for .NET
Remove Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : Remove Method

filePath
The absolute or relative (to WorkingDirectory) path of an existing file.

Glossary Item Box

Removes a file.

Syntax

Visual Basic (Declaration)
Public Sub Remove( _
   ByVal filePath As String _
)
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim filePath As String

instance.Remove(filePath)
C#
public void Remove(
   string filePath
)
Managed Extensions for C++
public: void Remove(
   string* filePath
)
C++/CLI
public:
void Remove(
   String^ filePath
)

Parameters

filePath
The absolute or relative (to WorkingDirectory) path of an existing file.

See Also

Reference

Sftp Class
Sftp Members


RemoveDirectory Method

[image]
PowerTCP SSH and SFTP for .NET
RemoveDirectory Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : RemoveDirectory Method

directoryPath
The absolute or relative (to WorkingDirectory) path of the directory to remove.

Glossary Item Box

Removes a directory and its subfolders and files.

Syntax

Visual Basic (Declaration)
Public Function RemoveDirectory( _
   ByVal directoryPath As String _
) As RemoveResult()
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim directoryPath As String
Dim value() As RemoveResult

value = instance.RemoveDirectory(directoryPath)
C#
public RemoveResult[] RemoveDirectory(
   string directoryPath
)
Managed Extensions for C++
public: RemoveResult*[]* RemoveDirectory(
   string* directoryPath
)
C++/CLI
public:
array<RemoveResult^>^ RemoveDirectory(
   String^ directoryPath
)

Parameters

directoryPath
The absolute or relative (to WorkingDirectory) path of the directory to remove.

Return Value

An array of RemoveResult objects representing the files and directories removed.

Remarks

This method will not throw an exception under error conditions. Instead, check the Exception property of each returned RemoveResult.

If removal of non-empty directories is not desired, use List to check for subfolders or files.

See Also

Reference

Sftp Class
Sftp Members


Rename Method

[image]
PowerTCP SSH and SFTP for .NET
Rename Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : Rename Method

oldPath
The absolute or relative (to WorkingDirectory) path of an existing directory or file.
newPath
The absolute or relative (to WorkingDirectory) new path.

Glossary Item Box

Renames or moves a file or directory.

Syntax

Visual Basic (Declaration)
Public Sub Rename( _
   ByVal oldPath As String, _
   ByVal newPath As String _
)
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim oldPath As String
Dim newPath As String

instance.Rename(oldPath, newPath)
C#
public void Rename(
   string oldPath,
   string newPath
)
Managed Extensions for C++
public: void Rename(
   string* oldPath,
   string* newPath
)
C++/CLI
public:
void Rename(
   String^ oldPath,
   String^ newPath
)

Parameters

oldPath
The absolute or relative (to WorkingDirectory) path of an existing directory or file.
newPath
The absolute or relative (to WorkingDirectory) new path.

See Also

Reference

Sftp Class
Sftp Members


SetAttributes Method

[image]
PowerTCP SSH and SFTP for .NET
SetAttributes Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : SetAttributes Method

path
The absolute or relative (to WorkingDirectory) path of an existing file or directory.
attributes
A SftpFileAttributes object. Specifies the modifications to be carried out on the attributes of the file. Empty fields will be ignored.

Glossary Item Box

Modifies the attributes of a file. Used for operations such as changing the ownership, permissions or access times, as well as for truncating a file.

Syntax

Visual Basic (Declaration)
Public Sub SetAttributes( _
   ByVal path As String, _
   ByVal attributes As SftpFileAttributes _
)
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim path As String
Dim attributes As SftpFileAttributes

instance.SetAttributes(path, attributes)
C#
public void SetAttributes(
   string path,
   SftpFileAttributes attributes
)
Managed Extensions for C++
public: void SetAttributes(
   string* path,
   SftpFileAttributes* attributes
)
C++/CLI
public:
void SetAttributes(
   String^ path,
   SftpFileAttributes^ attributes
)

Parameters

path
The absolute or relative (to WorkingDirectory) path of an existing file or directory.
attributes
A SftpFileAttributes object. Specifies the modifications to be carried out on the attributes of the file. Empty fields will be ignored.

See Also

Reference

Sftp Class
Sftp Members


Start Method

[image]
PowerTCP SSH and SFTP for .NET
Start Method
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : Start Method

worker
SshThreadStart delegate specifying the function to execute.
state
Information to pass to the worker delegate function; can be null.

Glossary Item Box

Starts a worker thread on which the specified delegate function executes.

Syntax

Visual Basic (Declaration)
Public Sub Start( _
   ByVal worker As WaitCallback, _
   ByVal state As Object _
)
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim worker As WaitCallback
Dim state As Object

instance.Start(worker, state)
C#
public void Start(
   WaitCallback worker,
   object state
)
Managed Extensions for C++
public: void Start(
   WaitCallback* worker,
   Object* state
)
C++/CLI
public:
void Start(
   WaitCallback^ worker,
   Object^ state
)

Parameters

worker
SshThreadStart delegate specifying the function to execute.
state
Information to pass to the worker delegate function; can be null.

Remarks

This method provides an easy means for executing blocking functions on a worker thread. Applications with a UI thread should use this technique to execute processes (like Connect and Read) that can block the UI thread.

The state parameter can be null for cases in which no state information needs to be passed to the worker delegate function.

Unhandled exceptions occurring on the worker thread will be caught and reported in the Error event.

See Also

Reference

Sftp Class
Sftp Members


Sftp Class Properties

[image]
PowerTCP SSH and SFTP for .NET
Sftp Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : Sftp Class

Glossary Item Box

For a list of all members of this type, see Sftp members.

Public Properties

 | Name | Description
Public Property | AcceptAllHostKeys | When true, all host keys are accepted if not overridden with HostKeyEventArgs.Verified. When false, the SshConnection.HostKey event must be used to verify host keys. (Inherited from Dart.Ssh.SshConnection)
Public Property | AutoSetTime | Gets or sets whether the modified time should be updated on a file after a Put or Get.
Public Property | Connection | Gets the underlying Connection instance being used for server communications. (Inherited from Dart.Ssh.SshConnection)
Public Property | Container | (Inherited from System.ComponentModel.Component)
Public Property | Encoding | Character encoding used by the component. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Optimizations | Exposes properties used for optimizing file transfer speed.
Public Property | ProtocolVersion | Gets the negotiated SFTP protocol version.
Public Property | Site | (Inherited from System.ComponentModel.Component)
Public Property | State | Gets a value that reflects the current TCP connection state and SSH authentication state. (Inherited from Dart.Ssh.SshConnection)
Public Property | SynchronizingObject | Gets or sets the object used to marshal data to the UI thread (for raising events). (Inherited from Dart.Ssh.ComponentBase)
Public Property | SyncRoot | Gets an object that is used to synchronize access to the upper layer protocol in use. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Tag | Gets or sets an object that stores any user data. (Inherited from Dart.Ssh.ComponentBase)
Public Property | ThreadingModel | Controls the threading model used by the component. (Inherited from Dart.Ssh.ComponentBase)
Public Property | WorkingDirectory | Gets the fully specified working directory.
Top

Protected Properties

 | Name | Description
Protected Property | CanRaiseEvents | (Inherited from System.ComponentModel.Component)
Protected Property | DesignMode | (Inherited from System.ComponentModel.Component)
Protected Property | Events | (Inherited from System.ComponentModel.Component)
Top

See Also

Reference

Sftp Class
Dart.Ssh Namespace


AutoSetTime Property

[image]
PowerTCP SSH and SFTP for .NET
AutoSetTime Property
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : AutoSetTime Property

Glossary Item Box

Gets or sets whether the modified time should be updated on a file after a Put or Get.

Syntax

Visual Basic (Declaration)
<DefaultValueAttribute()>
Public Property AutoSetTime As Boolean
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim value As Boolean

instance.AutoSetTime = value

value = instance.AutoSetTime
C#
[DefaultValue()]
public bool AutoSetTime {get; set;}
Managed Extensions for C++
[DefaultValue()]
public: __property bool get_AutoSetTime();
public: __property void set_AutoSetTime(
   bool value
);
C++/CLI
[DefaultValue()]
public:
property bool AutoSetTime {
   bool get();
   void set (    bool value);
}

Remarks

After a Put, a SetAttributes operation is performed to update the transferred file's MTIME attribute if this property is true. This can result in the method throwing an exception if the file is immediately removed or moved on the server.

After a Get, the local file will be updated with the file's modified time on the server if this property is true.

See Also

Reference

Sftp Class
Sftp Members


Optimizations Property

[image]
PowerTCP SSH and SFTP for .NET
Optimizations Property
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : Optimizations Property

Glossary Item Box

Exposes properties used for optimizing file transfer speed.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Optimizations As Optimizations
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim value As Optimizations

value = instance.Optimizations
C#
public Optimizations Optimizations {get;}
Managed Extensions for C++
public: __property Optimizations* get_Optimizations();
C++/CLI
public:
property Optimizations^ Optimizations {
   Optimizations^ get();
}

See Also

Reference

Sftp Class
Sftp Members


ProtocolVersion Property

[image]
PowerTCP SSH and SFTP for .NET
ProtocolVersion Property
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : ProtocolVersion Property

Glossary Item Box

Gets the negotiated SFTP protocol version.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ProtocolVersion As Integer
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim value As Integer

value = instance.ProtocolVersion
C#
public int ProtocolVersion {get;}
Managed Extensions for C++
public: __property int get_ProtocolVersion();
C++/CLI
public:
property int ProtocolVersion {
   int get();
}

Property Value

SFTP protocol version, i.e., "3".

See Also

Reference

Sftp Class
Sftp Members


WorkingDirectory Property

[image]
PowerTCP SSH and SFTP for .NET
WorkingDirectory Property
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : WorkingDirectory Property

Glossary Item Box

Gets the fully specified working directory.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property WorkingDirectory As String
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim value As String

value = instance.WorkingDirectory
C#
public string WorkingDirectory {get;}
Managed Extensions for C++
public: __property string* get_WorkingDirectory();
C++/CLI
public:
property String^ WorkingDirectory {
   String^ get();
}

Remarks

When relative filenames and paths are provided to methods in the Sftp class, the value of this property is prepended to provided values to create absolute paths for all SFTP server commands.

See Also

Reference

Sftp Class
Sftp Members


Sftp Class Events

[image]
PowerTCP SSH and SFTP for .NET
Sftp Class Events
See Also Send comments on this topic
Dart.Ssh Namespace : Sftp Class

Glossary Item Box

For a list of all members of this type, see Sftp members.

Public Events

 | Name | Description
Public Event | Banner | Raised when the server presents a banner during authentication. (Inherited from Dart.Ssh.SshConnection)
Public Event | Challenge | Raised when the server presents its challenges during 'keyboard-interactive' authentication. (Inherited from Dart.Ssh.SshConnection)
Public Event | Disposed | (Inherited from System.ComponentModel.Component)
Public Event | Error | Raised when Marshal(Exception) is used or an unhandled Exception is thrown in a worker thread created using Start. (Inherited from Dart.Ssh.ComponentBase)
Public Event | HostKey | Raised when the server presents its hostkey while establishing a connection. (Inherited from Dart.Ssh.SshConnection)
Public Event | Log | Used to log packet-level communications. (Inherited from Dart.Ssh.SshConnection)
Public Event | Progress | Occurs as each buffer of file data is sent or received.
Public Event | StateChanged | Raised when the value of the State property changes, or a call to any Authenticate method returns. (Inherited from Dart.Ssh.SshConnection)
Public Event | UserState | Raised when Marshal(String,Object) is used. (Inherited from Dart.Ssh.ComponentBase)
Top

See Also

Reference

Sftp Class
Dart.Ssh Namespace


Progress Event

[image]
PowerTCP SSH and SFTP for .NET
Progress Event
See Also Send comments on this topic
Dart.Ssh Namespace > Sftp Class : Progress Event

Glossary Item Box

Occurs as each buffer of file data is sent or received.

Syntax

Visual Basic (Declaration)
Public Event Progress As Sftp.ProgressEventHandler
Visual Basic (Usage) Copy Code
Dim instance As Sftp
Dim handler As Sftp.ProgressEventHandler

AddHandler instance.Progress, handler
C#
public event Sftp.ProgressEventHandler Progress
Managed Extensions for C++
public: __event Sftp.ProgressEventHandler* Progress
C++/CLI
public:
event Sftp.ProgressEventHandler^ Progress

Event Data

The event handler receives an argument of type ProgressEventArgs containing data related to this event. The following ProgressEventArgs properties provide information specific to this event.

Property | Description
Item | Gets progress for the current file or directory in the copy operation.
List | Gets progress for the entire copy operation.

Remarks

The BlockSize property controls how often this event is raised.

Note: updating the UI from this event can negatively impact transfer speed.

See the ComponentBase.SynchronizingObject property for important information on updating UI controls from within this event.

See Also

Reference

Sftp Class
Sftp Members


SftpException Class

[image]
PowerTCP SSH and SFTP for .NET
SftpException Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : SftpException Class

Glossary Item Box

Wraps error messages sent by the SFTP server.

Object Model

SftpException Class

Syntax

Visual Basic (Declaration)
Public Class SftpException
   Inherits System.IO.IOException
Visual Basic (Usage) Copy Code
Dim instance As SftpException
C#
public class SftpException : System.IO.IOException
Managed Extensions for C++
public __gc class SftpException : public System.IO.IOException
C++/CLI
public ref class SftpException : public System.IO.IOException

Inheritance Hierarchy

System.Object
System.Exception
System.SystemException
System.IO.IOException
Dart.Ssh.SftpException

See Also

Reference

SftpException Members
Dart.Ssh Namespace


SftpException Class Members

[image]
PowerTCP SSH and SFTP for .NET
SftpException Class Members
See Also Properties Methods Events Send comments on this topic
Dart.Ssh Namespace : SftpException Class

Glossary Item Box

The following tables list the members exposed by SftpException.

Public Properties

 | Name | Description
Public Property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from System.Exception)
Public Property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from System.Exception)
Public Property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from System.Exception)
Public Property | InnerException | Gets the System.Exception instance that caused the current exception. (Inherited from System.Exception)
Public Property | Message | Gets a message that describes the current exception. (Inherited from System.Exception)
Public Property | ServerErrorCode | Gets the error code sent by the server.
Public Property | ServerErrorCodeSymbolic | Gets the symbolic name of the error code as given in the SFTP specs.
Public Property | ServerErrorCodeVerbose | Gets the error code description as given in the SFTP specs.
Public Property | ServerErrorMessage | Get the error message sent from the server.
Public Property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from System.Exception)
Public Property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from System.Exception)
Public Property | TargetSite | Gets the method that throws the current exception. (Inherited from System.Exception)
Top

Public Methods

 | Name | Description
Public Method | GetBaseException | When overridden in a derived class, returns the System.Exception that is the root cause of one or more subsequent exceptions. (Inherited from System.Exception)
Public Method | GetObjectData | When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception. (Inherited from System.Exception)
Public Method | GetType | Gets the runtime type of the current instance. (Inherited from System.Exception)
Public Method | ToString | Creates and returns a string representation of the current exception. (Inherited from System.Exception)
Top

Protected Events

 | Name | Description
Protected Event | SerializeObjectState | Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Inherited from System.Exception)
Top

See Also

Reference

SftpException Class
Dart.Ssh Namespace


SftpException Class Properties

[image]
PowerTCP SSH and SFTP for .NET
SftpException Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : SftpException Class

Glossary Item Box

For a list of all members of this type, see SftpException members.

Public Properties

 | Name | Description
Public Property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from System.Exception)
Public Property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from System.Exception)
Public Property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from System.Exception)
Public Property | InnerException | Gets the System.Exception instance that caused the current exception. (Inherited from System.Exception)
Public Property | Message | Gets a message that describes the current exception. (Inherited from System.Exception)
Public Property | ServerErrorCode | Gets the error code sent by the server.
Public Property | ServerErrorCodeSymbolic | Gets the symbolic name of the error code as given in the SFTP specs.
Public Property | ServerErrorCodeVerbose | Gets the error code description as given in the SFTP specs.
Public Property | ServerErrorMessage | Get the error message sent from the server.
Public Property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from System.Exception)
Public Property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from System.Exception)
Public Property | TargetSite | Gets the method that throws the current exception. (Inherited from System.Exception)
Top

See Also

Reference

SftpException Class
Dart.Ssh Namespace


ServerErrorCode Property

[image]
PowerTCP SSH and SFTP for .NET
ServerErrorCode Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpException Class : ServerErrorCode Property

Glossary Item Box

Gets the error code sent by the server.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ServerErrorCode As UInteger
Visual Basic (Usage) Copy Code
Dim instance As SftpException
Dim value As UInteger

value = instance.ServerErrorCode
C#
public uint ServerErrorCode {get;}
Managed Extensions for C++
public: __property uint get_ServerErrorCode();
C++/CLI
public:
property uint ServerErrorCode {
   uint get();
}

Property Value

The error code uint.

See Also

Reference

SftpException Class
SftpException Members


ServerErrorCodeSymbolic Property

[image]
PowerTCP SSH and SFTP for .NET
ServerErrorCodeSymbolic Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpException Class : ServerErrorCodeSymbolic Property

Glossary Item Box

Gets the symbolic name of the error code as given in the SFTP specs.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ServerErrorCodeSymbolic As String
Visual Basic (Usage) Copy Code
Dim instance As SftpException
Dim value As String

value = instance.ServerErrorCodeSymbolic
C#
public string ServerErrorCodeSymbolic {get;}
Managed Extensions for C++
public: __property string* get_ServerErrorCodeSymbolic();
C++/CLI
public:
property String^ ServerErrorCodeSymbolic {
   String^ get();
}

Property Value

The symbolic error string.

Remarks

An example is "SSH_FX_INVALID_FILENAME".

See Also

Reference

SftpException Class
SftpException Members


ServerErrorCodeVerbose Property

[image]
PowerTCP SSH and SFTP for .NET
ServerErrorCodeVerbose Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpException Class : ServerErrorCodeVerbose Property

Glossary Item Box

Gets the error code description as given in the SFTP specs.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ServerErrorCodeVerbose As String
Visual Basic (Usage) Copy Code
Dim instance As SftpException
Dim value As String

value = instance.ServerErrorCodeVerbose
C#
public string ServerErrorCodeVerbose {get;}
Managed Extensions for C++
public: __property string* get_ServerErrorCodeVerbose();
C++/CLI
public:
property String^ ServerErrorCodeVerbose {
   String^ get();
}

Property Value

The error code description string.

Remarks

An example is "The filename is not valid."

See Also

Reference

SftpException Class
SftpException Members


ServerErrorMessage Property

[image]
PowerTCP SSH and SFTP for .NET
ServerErrorMessage Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpException Class : ServerErrorMessage Property

Glossary Item Box

Get the error message sent from the server.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ServerErrorMessage As String
Visual Basic (Usage) Copy Code
Dim instance As SftpException
Dim value As String

value = instance.ServerErrorMessage
C#
public string ServerErrorMessage {get;}
Managed Extensions for C++
public: __property string* get_ServerErrorMessage();
C++/CLI
public:
property String^ ServerErrorMessage {
   String^ get();
}

Property Value

The error message string.

See Also

Reference

SftpException Class
SftpException Members


SftpFileAttributes Class

[image]
PowerTCP SSH and SFTP for .NET
SftpFileAttributes Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : SftpFileAttributes Class

Glossary Item Box

Provides detailed information about a file on the server. Not all fields may/must be present.

Object Model

SftpFileAttributes Class

Syntax

Visual Basic (Declaration)
Public Class SftpFileAttributes
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
C#
public class SftpFileAttributes
Managed Extensions for C++
public __gc class SftpFileAttributes
C++/CLI
public ref class SftpFileAttributes

Inheritance Hierarchy

System.Object
Dart.Ssh.SftpFileAttributes

See Also

Reference

SftpFileAttributes Members
Dart.Ssh Namespace


SftpFileAttributes Class Members

[image]
PowerTCP SSH and SFTP for .NET
SftpFileAttributes Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : SftpFileAttributes Class

Glossary Item Box

The following tables list the members exposed by SftpFileAttributes.

Public Constructors

 | Name | Description
Public Constructor | SftpFileAttributes Constructor |
Top

Public Properties

 | Name | Description
Public Property | ATIME | Gets or sets time last accessed. Jan 1, 1970 if not initialized.
Public Property | GetOctalPermissions | Converts the full POSIX permissions into a 7 digit octal representation.
Public Property | GetSymbolicPermissions | Converts the full POSIX permissions into a human-readable string.
Public Property | GID | Gets or sets the GID attribute. Empty string if not present.
Public Property | IsDirectory | True if this entry is a directory.
Public Property | IsFifo | True if this entry is a fifo.
Public Property | IsRegularFile | True if this entry is a regular file.
Public Property | IsSocket | True if this entry is a socket.
Public Property | IsSymlink | True if this entry is a symlink.
Public Property | MTIME | Gets or sets time last modified. Jan 1, 1970 if not initialized.
Public Property | Permissions | Gets or sets the POSIX permissions. 0 if not initialized.
Public Property | Size | Gets or sets the SIZE attribute. Empty string if not present.
Public Property | UID | Gets or sets he UID attribute. Empty string if not present.
Top

See Also

Reference

SftpFileAttributes Class
Dart.Ssh Namespace


SftpFileAttributes Constructor

[image]
PowerTCP SSH and SFTP for .NET
SftpFileAttributes Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : SftpFileAttributes Constructor

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As New SftpFileAttributes()
C#
public SftpFileAttributes()
Managed Extensions for C++
public: SftpFileAttributes();
C++/CLI
public:
SftpFileAttributes();

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


SftpFileAttributes Class Properties

[image]
PowerTCP SSH and SFTP for .NET
SftpFileAttributes Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : SftpFileAttributes Class

Glossary Item Box

For a list of all members of this type, see SftpFileAttributes members.

Public Properties

 | Name | Description
Public Property | ATIME | Gets or sets time last accessed. Jan 1, 1970 if not initialized.
Public Property | GetOctalPermissions | Converts the full POSIX permissions into a 7 digit octal representation.
Public Property | GetSymbolicPermissions | Converts the full POSIX permissions into a human-readable string.
Public Property | GID | Gets or sets the GID attribute. Empty string if not present.
Public Property | IsDirectory | True if this entry is a directory.
Public Property | IsFifo | True if this entry is a fifo.
Public Property | IsRegularFile | True if this entry is a regular file.
Public Property | IsSocket | True if this entry is a socket.
Public Property | IsSymlink | True if this entry is a symlink.
Public Property | MTIME | Gets or sets time last modified. Jan 1, 1970 if not initialized.
Public Property | Permissions | Gets or sets the POSIX permissions. 0 if not initialized.
Public Property | Size | Gets or sets the SIZE attribute. Empty string if not present.
Public Property | UID | Gets or sets he UID attribute. Empty string if not present.
Top

See Also

Reference

SftpFileAttributes Class
Dart.Ssh Namespace


ATIME Property

[image]
PowerTCP SSH and SFTP for .NET
ATIME Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : ATIME Property

Glossary Item Box

Gets or sets time last accessed. Jan 1, 1970 if not initialized.

Syntax

Visual Basic (Declaration)
Public Property ATIME As Date
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
Dim value As Date

instance.ATIME = value

value = instance.ATIME
C#
public DateTime ATIME {get; set;}
Managed Extensions for C++
public: __property DateTime get_ATIME();
public: __property void set_ATIME(
   DateTime value
);
C++/CLI
public:
property DateTime ATIME {
   DateTime get();
   void set (    DateTime value);
}

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


GetOctalPermissions Property

[image]
PowerTCP SSH and SFTP for .NET
GetOctalPermissions Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : GetOctalPermissions Property

Glossary Item Box

Converts the full POSIX permissions into a 7 digit octal representation.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property GetOctalPermissions As String
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
Dim value As String

value = instance.GetOctalPermissions
C#
public string GetOctalPermissions {get;}
Managed Extensions for C++
public: __property string* get_GetOctalPermissions();
C++/CLI
public:
property String^ GetOctalPermissions {
   String^ get();
}

Property Value

Is null if permissions are not available.

Remarks

The returned value is first masked with 0xFFFF.

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


GetSymbolicPermissions Property

[image]
PowerTCP SSH and SFTP for .NET
GetSymbolicPermissions Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : GetSymbolicPermissions Property

Glossary Item Box

Converts the full POSIX permissions into a human-readable string.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property GetSymbolicPermissions As String
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
Dim value As String

value = instance.GetSymbolicPermissions
C#
public string GetSymbolicPermissions {get;}
Managed Extensions for C++
public: __property string* get_GetSymbolicPermissions();
C++/CLI
public:
property String^ GetSymbolicPermissions {
   String^ get();
}

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


GID Property

[image]
PowerTCP SSH and SFTP for .NET
GID Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : GID Property

Glossary Item Box

Gets or sets the GID attribute. Empty string if not present.

Syntax

Visual Basic (Declaration)
Public Property GID As String
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
Dim value As String

instance.GID = value

value = instance.GID
C#
public string GID {get; set;}
Managed Extensions for C++
public: __property string* get_GID();
public: __property void set_GID(
   string* value
);
C++/CLI
public:
property String^ GID {
   String^ get();
   void set (    String^ value);
}

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


IsDirectory Property

[image]
PowerTCP SSH and SFTP for .NET
IsDirectory Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : IsDirectory Property

Glossary Item Box

True if this entry is a directory.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property IsDirectory As Boolean
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
Dim value As Boolean

value = instance.IsDirectory
C#
public bool IsDirectory {get;}
Managed Extensions for C++
public: __property bool get_IsDirectory();
C++/CLI
public:
property bool IsDirectory {
   bool get();
}

Property Value

Returns true if permissions are available and they indicate that this entry represents a directory.

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


IsFifo Property

[image]
PowerTCP SSH and SFTP for .NET
IsFifo Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : IsFifo Property

Glossary Item Box

True if this entry is a fifo.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property IsFifo As Boolean
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
Dim value As Boolean

value = instance.IsFifo
C#
public bool IsFifo {get;}
Managed Extensions for C++
public: __property bool get_IsFifo();
C++/CLI
public:
property bool IsFifo {
   bool get();
}

Property Value

Returns true if permissions are available and they indicate that this entry represents a fifo.

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


IsRegularFile Property

[image]
PowerTCP SSH and SFTP for .NET
IsRegularFile Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : IsRegularFile Property

Glossary Item Box

True if this entry is a regular file.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property IsRegularFile As Boolean
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
Dim value As Boolean

value = instance.IsRegularFile
C#
public bool IsRegularFile {get;}
Managed Extensions for C++
public: __property bool get_IsRegularFile();
C++/CLI
public:
property bool IsRegularFile {
   bool get();
}

Property Value

Returns true if permissions are available and they indicate that this entry represents a regular file.

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


IsSocket Property

[image]
PowerTCP SSH and SFTP for .NET
IsSocket Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : IsSocket Property

Glossary Item Box

True if this entry is a socket.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property IsSocket As Boolean
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
Dim value As Boolean

value = instance.IsSocket
C#
public bool IsSocket {get;}
Managed Extensions for C++
public: __property bool get_IsSocket();
C++/CLI
public:
property bool IsSocket {
   bool get();
}

Property Value

Returns true if permissions are available and they indicate that this entry represents a socket.

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


IsSymlink Property

[image]
PowerTCP SSH and SFTP for .NET
IsSymlink Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : IsSymlink Property

Glossary Item Box

True if this entry is a symlink.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property IsSymlink As Boolean
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
Dim value As Boolean

value = instance.IsSymlink
C#
public bool IsSymlink {get;}
Managed Extensions for C++
public: __property bool get_IsSymlink();
C++/CLI
public:
property bool IsSymlink {
   bool get();
}

Property Value

Returns true if permissions are available and they indicate that this entry represents a symlink.

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


MTIME Property

[image]
PowerTCP SSH and SFTP for .NET
MTIME Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : MTIME Property

Glossary Item Box

Gets or sets time last modified. Jan 1, 1970 if not initialized.

Syntax

Visual Basic (Declaration)
Public Property MTIME As Date
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
Dim value As Date

instance.MTIME = value

value = instance.MTIME
C#
public DateTime MTIME {get; set;}
Managed Extensions for C++
public: __property DateTime get_MTIME();
public: __property void set_MTIME(
   DateTime value
);
C++/CLI
public:
property DateTime MTIME {
   DateTime get();
   void set (    DateTime value);
}

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


Permissions Property

[image]
PowerTCP SSH and SFTP for .NET
Permissions Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : Permissions Property

Glossary Item Box

Gets or sets the POSIX permissions. 0 if not initialized.

Syntax

Visual Basic (Declaration)
Public Property Permissions As UInteger
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
Dim value As UInteger

instance.Permissions = value

value = instance.Permissions
C#
public uint Permissions {get; set;}
Managed Extensions for C++
public: __property uint get_Permissions();
public: __property void set_Permissions(
   uint value
);
C++/CLI
public:
property uint Permissions {
   uint get();
   void set (    uint value);
}

Remarks

  • S_IFMT 0xf000 bitmask for the file type bitfields
  • S_IFSOCK 0xc000 socket
  • S_IFLNK 0xa000 symbolic link
  • S_IFREG 0x8000 regular file
  • S_IFBLK 0x6000 block device
  • S_IFDIR 0x4000 directory
  • S_IFCHR 0x2000 character device
  • S_IFIFO 0x1000 fifo
  • S_ISUID 0x800 set UID bit
  • S_ISGID 0x400 set GID bit
  • S_ISVTX 0x200 sticky bit
  • S_IRWXU 0x1c0 mask for file owner permissions
  • S_IRUSR 0x100 owner has read permission
  • S_IWUSR 0x80 owner has write permission
  • S_IXUSR 0x40 owner has execute permission
  • S_IRWXG 0x38 mask for group permissions
  • S_IRGRP 0x20 group has read permission
  • S_IWGRP 0x10 group has write permission
  • S_IXGRP 0x08 group has execute permission
  • S_IRWXO 0x07 mask for permissions for others (not in group)
  • S_IROTH 0x04 others have read permission
  • S_IWOTH 0x02 others have write permission
  • S_IXOTH 0x01 others have execute permission

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


Size Property

[image]
PowerTCP SSH and SFTP for .NET
Size Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : Size Property

Glossary Item Box

Gets or sets the SIZE attribute. Empty string if not present.

Syntax

Visual Basic (Declaration)
Public Property Size As String
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
Dim value As String

instance.Size = value

value = instance.Size
C#
public string Size {get; set;}
Managed Extensions for C++
public: __property string* get_Size();
public: __property void set_Size(
   string* value
);
C++/CLI
public:
property String^ Size {
   String^ get();
   void set (    String^ value);
}

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


UID Property

[image]
PowerTCP SSH and SFTP for .NET
UID Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpFileAttributes Class : UID Property

Glossary Item Box

Gets or sets he UID attribute. Empty string if not present.

Syntax

Visual Basic (Declaration)
Public Property UID As String
Visual Basic (Usage) Copy Code
Dim instance As SftpFileAttributes
Dim value As String

instance.UID = value

value = instance.UID
C#
public string UID {get; set;}
Managed Extensions for C++
public: __property string* get_UID();
public: __property void set_UID(
   string* value
);
C++/CLI
public:
property String^ UID {
   String^ get();
   void set (    String^ value);
}

See Also

Reference

SftpFileAttributes Class
SftpFileAttributes Members


SftpPacket Class

[image]
PowerTCP SSH and SFTP for .NET
SftpPacket Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : SftpPacket Class

Glossary Item Box

Class used to interpret the contents of an SFTP packet.

Object Model

SftpPacket Class

Syntax

Visual Basic (Declaration)
Public Class SftpPacket
   Inherits ChannelPacket
Visual Basic (Usage) Copy Code
Dim instance As SftpPacket
C#
public class SftpPacket : ChannelPacket
Managed Extensions for C++
public __gc class SftpPacket : public ChannelPacket
C++/CLI
public ref class SftpPacket : public ChannelPacket

Inheritance Hierarchy

System.Object
Dart.Ssh.Packet
Dart.Ssh.ChannelPacket
Dart.Ssh.SftpPacket

See Also

Reference

SftpPacket Members
Dart.Ssh Namespace


SftpPacket Class Members

[image]
PowerTCP SSH and SFTP for .NET
SftpPacket Class Members
See Also Fields Properties Methods Send comments on this topic
Dart.Ssh Namespace : SftpPacket Class

Glossary Item Box

The following tables list the members exposed by SftpPacket.

Public Fields

 | Name | Description
Public Field | Content | The bytes sent or received. (Inherited from Dart.Ssh.Packet)
Top

Public Properties

 | Name | Description
Public Property | ChannelId | Channel identification. (Inherited from Dart.Ssh.ChannelPacket)
Public Property | Message | The transport-level SSH-2 message type. (Inherited from Dart.Ssh.Packet)
Public Property | RequestId | Identifies the request by sequence number.
Public Property | SftpMessage | Identifies the SFTP request.
Top

Public Methods

 | Name | Description
Public Method | ToString | Returns a formatted string suitable for viewing.
Top

See Also

Reference

SftpPacket Class
Dart.Ssh Namespace


SftpPacket Class Methods

[image]
PowerTCP SSH and SFTP for .NET
SftpPacket Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : SftpPacket Class

Glossary Item Box

For a list of all members of this type, see SftpPacket members.

Public Methods

 | Name | Description
Public Method | ToString | Returns a formatted string suitable for viewing.
Top

See Also

Reference

SftpPacket Class
Dart.Ssh Namespace


ToString Method

[image]
PowerTCP SSH and SFTP for .NET
ToString Method
See Also Send comments on this topic
Dart.Ssh Namespace > SftpPacket Class : ToString Method

Glossary Item Box

Returns a formatted string suitable for viewing.

Syntax

Visual Basic (Declaration)
Public Overrides Function ToString() As String
Visual Basic (Usage) Copy Code
Dim instance As SftpPacket
Dim value As String

value = instance.ToString()
C#
public override string ToString()
Managed Extensions for C++
public: string* ToString(); override
C++/CLI
public:
String^ ToString(); override

See Also

Reference

SftpPacket Class
SftpPacket Members


SftpPacket Class Properties

[image]
PowerTCP SSH and SFTP for .NET
SftpPacket Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : SftpPacket Class

Glossary Item Box

For a list of all members of this type, see SftpPacket members.

Public Properties

 | Name | Description
Public Property | ChannelId | Channel identification. (Inherited from Dart.Ssh.ChannelPacket)
Public Property | Message | The transport-level SSH-2 message type. (Inherited from Dart.Ssh.Packet)
Public Property | RequestId | Identifies the request by sequence number.
Public Property | SftpMessage | Identifies the SFTP request.
Top

See Also

Reference

SftpPacket Class
Dart.Ssh Namespace


RequestId Property

[image]
PowerTCP SSH and SFTP for .NET
RequestId Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpPacket Class : RequestId Property

Glossary Item Box

Identifies the request by sequence number.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property RequestId As UInteger
Visual Basic (Usage) Copy Code
Dim instance As SftpPacket
Dim value As UInteger

value = instance.RequestId
C#
public uint RequestId {get;}
Managed Extensions for C++
public: __property uint get_RequestId();
C++/CLI
public:
property uint RequestId {
   uint get();
}

See Also

Reference

SftpPacket Class
SftpPacket Members


SftpMessage Property

[image]
PowerTCP SSH and SFTP for .NET
SftpMessage Property
See Also Send comments on this topic
Dart.Ssh Namespace > SftpPacket Class : SftpMessage Property

Glossary Item Box

Identifies the SFTP request.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property SftpMessage As SftpMessage
Visual Basic (Usage) Copy Code
Dim instance As SftpPacket
Dim value As SftpMessage

value = instance.SftpMessage
C#
public SftpMessage SftpMessage {get;}
Managed Extensions for C++
public: __property SftpMessage get_SftpMessage();
C++/CLI
public:
property SftpMessage SftpMessage {
   SftpMessage get();
}

See Also

Reference

SftpPacket Class
SftpPacket Members


SocketBase Class

[image]
PowerTCP SSH and SFTP for .NET
SocketBase Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : SocketBase Class

Glossary Item Box

Base class for PowerTCP Components.

Object Model

SocketBase Class

Syntax

Visual Basic (Declaration)
Public Class SocketBase
   Inherits ComponentBase
Visual Basic (Usage) Copy Code
Dim instance As SocketBase
C#
public class SocketBase : ComponentBase
Managed Extensions for C++
public __gc class SocketBase : public ComponentBase
C++/CLI
public ref class SocketBase : public ComponentBase

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Dart.Ssh.ComponentBase
Dart.Ssh.SocketBase

See Also

Reference

SocketBase Members
Dart.Ssh Namespace


SocketBase Class Members

[image]
PowerTCP SSH and SFTP for .NET
SocketBase Class Members
See Also Properties Methods Events Send comments on this topic
Dart.Ssh Namespace : SocketBase Class

Glossary Item Box

The following tables list the members exposed by SocketBase.

Public Properties

 | Name | Description
Public Property | Container | (Inherited from System.ComponentModel.Component)
Public Property | Encoding | Character encoding used by the component. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Site | (Inherited from System.ComponentModel.Component)
Public Property | Socket | Gets the socket used by the component for communications.
Public Property | SynchronizingObject | Gets or sets the object used to marshal data to the UI thread (for raising events). (Inherited from Dart.Ssh.ComponentBase)
Public Property | SyncRoot | Gets an object that is used to synchronize access to the upper layer protocol in use. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Tag | Gets or sets an object that stores any user data. (Inherited from Dart.Ssh.ComponentBase)
Public Property | ThreadingModel | Controls the threading model used by the component. (Inherited from Dart.Ssh.ComponentBase)
Top

Protected Properties

 | Name | Description
Protected Property | CanRaiseEvents | (Inherited from System.ComponentModel.Component)
Protected Property | DesignMode | (Inherited from System.ComponentModel.Component)
Protected Property | Events | (Inherited from System.ComponentModel.Component)
Top

Public Methods

 | Name | Description
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Deserialize | Deserialize a previously serialized object. (Inherited from Dart.Ssh.ComponentBase)
Public Method | Dispose | Overloaded. Overridden. Disposes of SocketBase and its associated resources.
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Marshal | Overloaded. Marshals a string and/or object to the UI thread and raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Public Method | Serialize | Serialize an object to the provided destination stream. (Inherited from Dart.Ssh.ComponentBase)
Public Method | ToString | (Inherited from System.ComponentModel.Component)
Top

Protected Methods

 | Name | Description
Protected Method | Finalize | (Inherited from System.ComponentModel.Component)
Protected Method | GetService | (Inherited from System.ComponentModel.Component)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | OnError | Raises the Error event. (Inherited from Dart.Ssh.ComponentBase)
Protected Method | OnUserState | Raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Top

Public Events

 | Name | Description
Public Event | Disposed | (Inherited from System.ComponentModel.Component)
Public Event | Error | Raised when Marshal(Exception) is used or an unhandled Exception is thrown in a worker thread created using Start. (Inherited from Dart.Ssh.ComponentBase)
Public Event | UserState | Raised when Marshal(String,Object) is used. (Inherited from Dart.Ssh.ComponentBase)
Top

See Also

Reference

SocketBase Class
Dart.Ssh Namespace


SocketBase Class Methods

[image]
PowerTCP SSH and SFTP for .NET
SocketBase Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : SocketBase Class

Glossary Item Box

For a list of all members of this type, see SocketBase members.

Public Methods

 | Name | Description
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Deserialize | Deserialize a previously serialized object. (Inherited from Dart.Ssh.ComponentBase)
Public Method | Dispose | Overloaded. Overridden. Disposes of SocketBase and its associated resources.
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Marshal | Overloaded. Marshals a string and/or object to the UI thread and raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Public Method | Serialize | Serialize an object to the provided destination stream. (Inherited from Dart.Ssh.ComponentBase)
Public Method | ToString | (Inherited from System.ComponentModel.Component)
Top

Protected Methods

 | Name | Description
Protected Method | Finalize | (Inherited from System.ComponentModel.Component)
Protected Method | GetService | (Inherited from System.ComponentModel.Component)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | OnError | Raises the Error event. (Inherited from Dart.Ssh.ComponentBase)
Protected Method | OnUserState | Raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Top

See Also

Reference

SocketBase Class
Dart.Ssh Namespace


Dispose Method

[image]
PowerTCP SSH and SFTP for .NET
Dispose Method
See Also Send comments on this topic
Dart.Ssh Namespace > SocketBase Class : Dispose Method

Glossary Item Box

Disposes of SocketBase and its associated resources.

Overload List

Overload | Description
Dispose(Boolean) | Disposes of SocketBase and its associated resources.
Dispose() | (Inherited from System.ComponentModel.Component)

See Also

Reference

SocketBase Class
SocketBase Members


Dispose(Boolean) Method

[image]
PowerTCP SSH and SFTP for .NET
Dispose(Boolean) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SocketBase Class > Dispose Method : Dispose(Boolean) Method

disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.

Glossary Item Box

Disposes of SocketBase and its associated resources.

Syntax

Visual Basic (Declaration)
Protected Overloads Overrides Sub Dispose( _
   ByVal disposing As Boolean _
)
Visual Basic (Usage) Copy Code
Dim instance As SocketBase
Dim disposing As Boolean

instance.Dispose(disposing)
C#
protected override void Dispose(
   bool disposing
)
Managed Extensions for C++
protected: void Dispose(
   bool disposing
) override
C++/CLI
protected:
void Dispose(
   bool disposing
) override

Parameters

disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.

See Also

Reference

SocketBase Class
SocketBase Members
Overload List


SocketBase Class Properties

[image]
PowerTCP SSH and SFTP for .NET
SocketBase Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : SocketBase Class

Glossary Item Box

For a list of all members of this type, see SocketBase members.

Public Properties

 | Name | Description
Public Property | Container | (Inherited from System.ComponentModel.Component)
Public Property | Encoding | Character encoding used by the component. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Site | (Inherited from System.ComponentModel.Component)
Public Property | Socket | Gets the socket used by the component for communications.
Public Property | SynchronizingObject | Gets or sets the object used to marshal data to the UI thread (for raising events). (Inherited from Dart.Ssh.ComponentBase)
Public Property | SyncRoot | Gets an object that is used to synchronize access to the upper layer protocol in use. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Tag | Gets or sets an object that stores any user data. (Inherited from Dart.Ssh.ComponentBase)
Public Property | ThreadingModel | Controls the threading model used by the component. (Inherited from Dart.Ssh.ComponentBase)
Top

Protected Properties

 | Name | Description
Protected Property | CanRaiseEvents | (Inherited from System.ComponentModel.Component)
Protected Property | DesignMode | (Inherited from System.ComponentModel.Component)
Protected Property | Events | (Inherited from System.ComponentModel.Component)
Top

See Also

Reference

SocketBase Class
Dart.Ssh Namespace


Socket Property

[image]
PowerTCP SSH and SFTP for .NET
Socket Property
See Also Send comments on this topic
Dart.Ssh Namespace > SocketBase Class : Socket Property

Glossary Item Box

Gets the socket used by the component for communications.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Socket As Socket
Visual Basic (Usage) Copy Code
Dim instance As SocketBase
Dim value As Socket

value = instance.Socket
C#
public Socket Socket {get;}
Managed Extensions for C++
public: __property Socket* get_Socket();
C++/CLI
public:
property Socket^ Socket {
   Socket^ get();
}

Property Value

The Socket used for UDP or TCP communications. Returns null when not in use.

See Also

Reference

SocketBase Class
SocketBase Members


Ssh Class

[image]
PowerTCP SSH and SFTP for .NET
Ssh Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : Ssh Class

Glossary Item Box

The Ssh component is used to manage one or more SSH sessions.

Object Model

Ssh ClassConnection Class

Syntax

Visual Basic (Declaration)
Public Class Ssh
   Inherits SshConnection
Visual Basic (Usage) Copy Code
Dim instance As Ssh
C#
public class Ssh : SshConnection
Managed Extensions for C++
public __gc class Ssh : public SshConnection
C++/CLI
public ref class Ssh : public SshConnection

Remarks

Typically, the SshConnection.Connect and SshConnection.Authenticate methods are used to establish an active connection (indicated by the SshConnection.State property). Subsequent calls to StartShell, StartShell(String,Int32,Int32,Int32,Int32,Byte[]), Execute(String) and StartSubSystem return SessionStream objects that utilized the Connection object to communicate with the host.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Dart.Ssh.ComponentBase
Dart.Ssh.SshConnection
Dart.Ssh.Ssh

See Also

Reference

Ssh Members
Dart.Ssh Namespace


Ssh Class Members

[image]
PowerTCP SSH and SFTP for .NET
Ssh Class Members
See Also Properties Methods Events Send comments on this topic
Dart.Ssh Namespace : Ssh Class

Glossary Item Box

The following tables list the members exposed by Ssh.

Public Constructors

 | Name | Description
Public Constructor | Ssh Constructor | Overloaded.
Top

Public Properties

 | Name | Description
Public Property | AcceptAllHostKeys | When true, all host keys are accepted if not overridden with HostKeyEventArgs.Verified. When false, the SshConnection.HostKey event must be used to verify host keys. (Inherited from Dart.Ssh.SshConnection)
Public Property | Connection | Gets the underlying Connection instance being used for server communications. (Inherited from Dart.Ssh.SshConnection)
Public Property | Container | (Inherited from System.ComponentModel.Component)
Public Property | Encoding | Character encoding used by the component. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Site | (Inherited from System.ComponentModel.Component)
Public Property | State | Gets a value that reflects the current TCP connection state and SSH authentication state. (Inherited from Dart.Ssh.SshConnection)
Public Property | SynchronizingObject | Gets or sets the object used to marshal data to the UI thread (for raising events). (Inherited from Dart.Ssh.ComponentBase)
Public Property | SyncRoot | Gets an object that is used to synchronize access to the upper layer protocol in use. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Tag | Gets or sets an object that stores any user data. (Inherited from Dart.Ssh.ComponentBase)
Public Property | ThreadingModel | Controls the threading model used by the component. (Inherited from Dart.Ssh.ComponentBase)
Top

Protected Properties

 | Name | Description
Protected Property | CanRaiseEvents | (Inherited from System.ComponentModel.Component)
Protected Property | DesignMode | (Inherited from System.ComponentModel.Component)
Protected Property | Events | (Inherited from System.ComponentModel.Component)
Top

Public Methods

 | Name | Description
Public Method | Authenticate | Overloaded. Performs 'keyboard-interactive' authentication. (Inherited from Dart.Ssh.SshConnection)
Public Method | Close | Closes the connection to the SSH-2 server. (Inherited from Dart.Ssh.SshConnection)
Public Method | Connect | Overloaded. Connects to the SSH-2 server specified by Connection.RemoteEndPoint. (Inherited from Dart.Ssh.SshConnection)
Public Method | CreateLocalPortForwarder | Overloaded. Creates a new LocalPortForwarder. (Inherited from Dart.Ssh.SshConnection)
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Deserialize | Deserialize a previously serialized object. (Inherited from Dart.Ssh.ComponentBase)
Public Method | Dispose | Overloaded. Overridden. Releases all resources associated with the object.
Public Method | Execute | Overloaded. Executes a command on the server.
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Marshal | Overloaded. Marshals data to the UI thread.
Public Method | OnBanner | Raises the SshConnection.Banner event. (Inherited from Dart.Ssh.SshConnection)
Public Method | OnChallenge | Raises the SshConnection.Challenge event. (Inherited from Dart.Ssh.SshConnection)
Public Method | OnHostKey | Raises the SshConnection.HostKey event. (Inherited from Dart.Ssh.SshConnection)
Public Method | Serialize | Serialize an object to the provided destination stream. (Inherited from Dart.Ssh.ComponentBase)
Public Method | Start | Starts a worker thread on which the specified delegate function executes.
Public Method | StartShell | Overloaded. Starts a "dumb" shell.
Public Method | StartSubSystem | Starts a subsystem on the remote machine. For advanced applications.
Public Method | ToString | (Inherited from System.ComponentModel.Component)
Top

Protected Methods

 | Name | Description
Protected Method | Finalize | (Inherited from System.ComponentModel.Component)
Protected Method | GetService | (Inherited from System.ComponentModel.Component)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | OnData | Raises the Data event.
Protected Method | OnError | Raises the Error event. (Inherited from Dart.Ssh.ComponentBase)
Protected Method | OnLog | Raises the Log event. (Inherited from Dart.Ssh.SshConnection)
Protected Method | OnStateChanged | Raises the SshConnection.StateChanged event. (Inherited from Dart.Ssh.SshConnection)
Protected Method | OnUserState | Raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Top

Public Events

 | Name | Description
Public Event | Banner | Raised when the server presents a banner during authentication. (Inherited from Dart.Ssh.SshConnection)
Public Event | Challenge | Raised when the server presents its challenges during 'keyboard-interactive' authentication. (Inherited from Dart.Ssh.SshConnection)
Public Event | Data | Raised when the Marshal method is called by the user.
Public Event | Disposed | (Inherited from System.ComponentModel.Component)
Public Event | Error | Raised when Marshal(Exception) is used or an unhandled Exception is thrown in a worker thread created using Start. (Inherited from Dart.Ssh.ComponentBase)
Public Event | HostKey | Raised when the server presents its hostkey while establishing a connection. (Inherited from Dart.Ssh.SshConnection)
Public Event | Log | Used to log packet-level communications. (Inherited from Dart.Ssh.SshConnection)
Public Event | StateChanged | Raised when the value of the State property changes, or a call to any Authenticate method returns. (Inherited from Dart.Ssh.SshConnection)
Public Event | UserState | Raised when Marshal(String,Object) is used. (Inherited from Dart.Ssh.ComponentBase)
Top

See Also

Reference

Ssh Class
Dart.Ssh Namespace


Ssh Constructor

[image]
PowerTCP SSH and SFTP for .NET
Ssh Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class : Ssh Constructor

Glossary Item Box

Overload List

Overload | Description
Ssh Constructor() | Creates an instance of the Ssh class outside the design environment.
Ssh Constructor(IContainer) | Creates an instance of the Ssh class inside the design environment.

See Also

Reference

Ssh Class
Ssh Members


Ssh Constructor()

[image]
PowerTCP SSH and SFTP for .NET
Ssh Constructor()
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class > Ssh Constructor : Ssh Constructor()

Glossary Item Box

Creates an instance of the Ssh class outside the design environment.

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As New Ssh()
C#
public Ssh()
Managed Extensions for C++
public: Ssh();
C++/CLI
public:
Ssh();

See Also

Reference

Ssh Class
Ssh Members
Overload List


Ssh Constructor(IContainer)

[image]
PowerTCP SSH and SFTP for .NET
Ssh Constructor(IContainer)
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class > Ssh Constructor : Ssh Constructor(IContainer)

container
Container used by the design environment to manage components.

Glossary Item Box

Creates an instance of the Ssh class inside the design environment.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal container As IContainer _
)
Visual Basic (Usage) Copy Code
Dim container As IContainer

Dim instance As New Ssh(container)
C#
public Ssh(
   IContainer container
)
Managed Extensions for C++
public: Ssh(
   IContainer* container
)
C++/CLI
public:
Ssh(
   IContainer^ container
)

Parameters

container
Container used by the design environment to manage components.

See Also

Reference

Ssh Class
Ssh Members
Overload List


Ssh Class Methods

[image]
PowerTCP SSH and SFTP for .NET
Ssh Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : Ssh Class

Glossary Item Box

For a list of all members of this type, see Ssh members.

Public Methods

 | Name | Description
Public Method | Authenticate | Overloaded. Performs 'keyboard-interactive' authentication. (Inherited from Dart.Ssh.SshConnection)
Public Method | Close | Closes the connection to the SSH-2 server. (Inherited from Dart.Ssh.SshConnection)
Public Method | Connect | Overloaded. Connects to the SSH-2 server specified by Connection.RemoteEndPoint. (Inherited from Dart.Ssh.SshConnection)
Public Method | CreateLocalPortForwarder | Overloaded. Creates a new LocalPortForwarder. (Inherited from Dart.Ssh.SshConnection)
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Deserialize | Deserialize a previously serialized object. (Inherited from Dart.Ssh.ComponentBase)
Public Method | Dispose | Overloaded. Overridden. Releases all resources associated with the object.
Public Method | Execute | Overloaded. Executes a command on the server.
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Marshal | Overloaded. Marshals data to the UI thread.
Public Method | OnBanner | Raises the SshConnection.Banner event. (Inherited from Dart.Ssh.SshConnection)
Public Method | OnChallenge | Raises the SshConnection.Challenge event. (Inherited from Dart.Ssh.SshConnection)
Public Method | OnHostKey | Raises the SshConnection.HostKey event. (Inherited from Dart.Ssh.SshConnection)
Public Method | Serialize | Serialize an object to the provided destination stream. (Inherited from Dart.Ssh.ComponentBase)
Public Method | Start | Starts a worker thread on which the specified delegate function executes.
Public Method | StartShell | Overloaded. Starts a "dumb" shell.
Public Method | StartSubSystem | Starts a subsystem on the remote machine. For advanced applications.
Public Method | ToString | (Inherited from System.ComponentModel.Component)
Top

Protected Methods

 | Name | Description
Protected Method | Finalize | (Inherited from System.ComponentModel.Component)
Protected Method | GetService | (Inherited from System.ComponentModel.Component)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | OnData | Raises the Data event.
Protected Method | OnError | Raises the Error event. (Inherited from Dart.Ssh.ComponentBase)
Protected Method | OnLog | Raises the Log event. (Inherited from Dart.Ssh.SshConnection)
Protected Method | OnStateChanged | Raises the SshConnection.StateChanged event. (Inherited from Dart.Ssh.SshConnection)
Protected Method | OnUserState | Raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Top

See Also

Reference

Ssh Class
Dart.Ssh Namespace


Dispose Method

[image]
PowerTCP SSH and SFTP for .NET
Dispose Method
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class : Dispose Method

Glossary Item Box

Releases all resources associated with the object.

Overload List

Overload | Description
Dispose(Boolean) | Releases all resources associated with the object.
Dispose() | (Inherited from System.ComponentModel.Component)

See Also

Reference

Ssh Class
Ssh Members


Dispose(Boolean) Method

[image]
PowerTCP SSH and SFTP for .NET
Dispose(Boolean) Method
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class > Dispose Method : Dispose(Boolean) Method

disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.

Glossary Item Box

Releases all resources associated with the object.

Syntax

Visual Basic (Declaration)
Protected Overloads Overrides Sub Dispose( _
   ByVal disposing As Boolean _
)
Visual Basic (Usage) Copy Code
Dim instance As Ssh
Dim disposing As Boolean

instance.Dispose(disposing)
C#
protected override void Dispose(
   bool disposing
)
Managed Extensions for C++
protected: void Dispose(
   bool disposing
) override
C++/CLI
protected:
void Dispose(
   bool disposing
) override

Parameters

disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.

See Also

Reference

Ssh Class
Ssh Members
Overload List


Execute Method

[image]
PowerTCP SSH and SFTP for .NET
Execute Method
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class : Execute Method

Glossary Item Box

Executes a command on the server.

Overload List

Overload | Description
Execute(String) | Executes a command on the server.
Execute(String,Object) | Executes a command on the server.

See Also

Reference

Ssh Class
Ssh Members


Execute(String) Method

[image]
PowerTCP SSH and SFTP for .NET
Execute(String) Method
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class > Execute Method : Execute(String) Method

command
Command to execute.

Glossary Item Box

Executes a command on the server.

Syntax

Visual Basic (Declaration)
Public Overloads Function Execute( _
   ByVal command As String _
) As Data
Visual Basic (Usage) Copy Code
Dim instance As Ssh
Dim command As String
Dim value As Data

value = instance.Execute(command)
C#
public Data Execute(
   string command
)
Managed Extensions for C++
public: Data* Execute(
   string* command
)
C++/CLI
public:
Data^ Execute(
   String^ command
)

Parameters

command
Command to execute.

Return Value

A Data object containing the response from the server.

Remarks

This method is typically used for non-interactive applications and is threadsafe (commands may be executed concurrently on multiple threads). If Ssh.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Data event is raised containing the result upon completion, or the Error event is raised if an exception is thrown.

See Also

Reference

Ssh Class
Ssh Members
Overload List


Execute(String,Object) Method

[image]
PowerTCP SSH and SFTP for .NET
Execute(String,Object) Method
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class > Execute Method : Execute(String,Object) Method

command
Command to execute.
state
Optional parameter useful for passing state information to the Data event in a COM environment.

Glossary Item Box

Executes a command on the server.

Syntax

Visual Basic (Declaration)
Public Overloads Function Execute( _
   ByVal command As String, _
   ByVal state As Object _
) As Data
Visual Basic (Usage) Copy Code
Dim instance As Ssh
Dim command As String
Dim state As Object
Dim value As Data

value = instance.Execute(command, state)
C#
public Data Execute(
   string command,
   object state
)
Managed Extensions for C++
public: Data* Execute(
   string* command,
   Object* state
)
C++/CLI
public:
Data^ Execute(
   String^ command,
   Object^ state
)

Parameters

command
Command to execute.
state
Optional parameter useful for passing state information to the Data event in a COM environment.

Return Value

A Data object containing the response from the server.

Remarks

This method is typically used for non-interactive applications and is threadsafe (commands may be executed concurrently on multiple threads). If Ssh.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Data event is raised containing the result upon completion, or the Error event is raised if an exception is thrown.

See Also

Reference

Ssh Class
Ssh Members
Overload List


Marshal Method

[image]
PowerTCP SSH and SFTP for .NET
Marshal Method
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class : Marshal Method

Glossary Item Box

Marshals data to the UI thread.

Overload List

Overload | Description
Marshal(Data,SessionStream,String,Object) | Marshals data to the UI thread.
Marshal(String,Object) | Marshals a string and/or object to the UI thread and raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Marshal(Exception) | Marshals an exception to the UI thread and raises the Error event. (Inherited from Dart.Ssh.ComponentBase)

See Also

Reference

Ssh Class
Ssh Members


Marshal(Data,SessionStream,String,Object) Method

[image]
PowerTCP SSH and SFTP for .NET
Marshal(Data,SessionStream,String,Object) Method
See Also Example Send comments on this topic
Dart.Ssh Namespace > Ssh Class > Marshal Method : Marshal(Data,SessionStream,String,Object) Method

data
The data to be marshaled.
session
The SessionStream the data was read from.
message
Text to be marshalled.
state
State information to be marshaled.

Glossary Item Box

Marshals data to the UI thread.

Syntax

Visual Basic (Declaration)
Public Overloads Sub Marshal( _
   ByVal data As Data, _
   ByVal session As SessionStream, _
   ByVal message As String, _
   ByVal state As Object _
)
Visual Basic (Usage) Copy Code
Dim instance As Ssh
Dim data As Data
Dim session As SessionStream
Dim message As String
Dim state As Object

instance.Marshal(data, session, message, state)
C#
public void Marshal(
   Data data,
   SessionStream session,
   string message,
   object state
)
Managed Extensions for C++
public: void Marshal(
   Data* data,
   SessionStream* session,
   string* message,
   Object* state
)
C++/CLI
public:
void Marshal(
   Data^ data,
   SessionStream^ session,
   String^ message,
   Object^ state
)

Parameters

data
The data to be marshaled.
session
The SessionStream the data was read from.
message
Text to be marshalled.
state
State information to be marshaled.

Remarks

This method is used to marshal data from a worker thread back to the UI thread for typical display purposes. It calls the OnData method, which raises the Data event.

Example

The example below demonstrates how to receive data without blocking the UI.
C# Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
    //Connect and log into the server. Can be executed on a worker
    //thread to not block the UI; executed synchronously here for simplicity
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword);
    //Execute the specified 'receiveData' method on a worker thread to not block the UI
    ssh1.Start(receiveData, null);
}

private void connectAndLogin(string hostname, int port, string username, string password)
{
    //Connect to the server
    ssh1.Connection.RemoteEndPoint.HostNameOrAddress = hostname;
    ssh1.Connection.RemoteEndPoint.Port = port; //Usually 22
    ssh1.Connect();

    //Authenticate
    SshLoginData loginDetails = new SshLoginData();
    loginDetails.Username = username;
    loginDetails.Password = password;
    ssh1.Authenticate(loginDetails);
}

/// <summary>
/// Receives data from the server and marshals it to the UI thread for display.
/// </summary>
/// <param name="notUsed">Not used in this snippet</param>
private void receiveData(object notUsed)
{
    //Establish a shell
    SessionStream session = ssh1.StartShell();

    //Receive data when it is sent by the remote host
    //Marshal it to the UI for display
    while (true)
    {
        byte[] buf = new byte[1024];
        Data data = session.Read(buf);
        //If data.Count is 0, the connection has been closed, so break out of the loop.
        if (data.Count == 0)
            break;
        ssh1.Marshal(data, session, "", null);
    }
}

/// <summary>
/// Raised on the UI thread, when ssh1.Marshal is called in receiveData.
/// </summary>
private void ssh1_Data(object sender, SshDataEventArgs e)
{
    textBox1.AppendText(e.Data.ToString());
}
Visual Basic Copy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    'Connect and log into the server. Can be executed on a worker
    'thread to not block the UI; executed synchronously here for simplicity
    connectAndLogin(myServerHostname, myServerPort, myUsername, myPassword)
    'Execute the specified 'receiveData' method on a worker thread to not block the UI
    ssh1.Start(AddressOf receiveData, Nothing)
End Sub

Private Sub connectAndLogin(ByVal hostname As String, ByVal port As Integer, ByVal username As String, ByVal password As String)
    'Connect to the server
    ssh1.Connection.RemoteEndPoint.HostNameOrAddress = hostname
    ssh1.Connection.RemoteEndPoint.Port = port 'Usually 22
    ssh1.Connect()

    'Authenticate
    Dim loginDetails As New SshLoginData()
    loginDetails.Username = username
    loginDetails.Password = password
    ssh1.Authenticate(loginDetails)
End Sub

''' <summary>
''' Receives data from the server and marshals it to the UI thread for display.
''' </summary>
''' <param name="notUsed">Not used in this snippet</param>
Private Sub receiveData(ByVal notUsed As Object)
    'Establish a shell
    Dim session As SessionStream = ssh1.StartShell()

    'Receive data when it is sent by the remote host
    'Marshal it to the UI for display
    Do
        Dim buf(1023) As Byte
        Dim data As Data = session.Read(buf)
        'If data.Count is 0, the connection has been closed, so break out of the loop.
        If data.Count = 0 Then
            Exit Do
        End If
        ssh1.Marshal(data, session, "", Nothing)
    Loop
End Sub

''' <summary>
''' Raised on the UI thread, when ssh1.Marshal is called in receiveData.
''' </summary>
Private Sub ssh1_Data(ByVal sender As Object, ByVal e As SshDataEventArgs) Handles ssh1.Data
    textBox1.AppendText(e.Data.ToString())
End Sub

See Also

Reference

Ssh Class
Ssh Members
Overload List


OnData Method

[image]
PowerTCP SSH and SFTP for .NET
OnData Method
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class : OnData Method

e
A DataEventArgs object that contains the event data.

Glossary Item Box

Raises the Data event.

Syntax

Visual Basic (Declaration)
Protected Overridable Sub OnData( _
   ByVal e As SshDataEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As Ssh
Dim e As SshDataEventArgs

instance.OnData(e)
C#
protected virtual void OnData(
   SshDataEventArgs e
)
Managed Extensions for C++
protected: virtual void OnData(
   SshDataEventArgs* e
)
C++/CLI
protected:
virtual void OnData(
   SshDataEventArgs^ e
)

Parameters

e
A DataEventArgs object that contains the event data.

Remarks

Raising an event invokes the event handler through a delegate. The Synchronizing property must be set to marshal data from a worker thread to the UI thread.

The OnData method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Note to Inheritors: When overriding OnData in a derived class, be sure to call the base class OnData method, so that registered delegates receive the event.

See the SynchronizingObject property for important information on updating UI controls from within derived classes and events.

See Also

Reference

Ssh Class
Ssh Members


Start Method

[image]
PowerTCP SSH and SFTP for .NET
Start Method
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class : Start Method

worker
WaitCallback delegate specifying the function to execute.
state
Information to pass to the worker delegate function; can be null.

Glossary Item Box

Starts a worker thread on which the specified delegate function executes.

Syntax

Visual Basic (Declaration)
Public Sub Start( _
   ByVal worker As WaitCallback, _
   ByVal state As Object _
)
Visual Basic (Usage) Copy Code
Dim instance As Ssh
Dim worker As WaitCallback
Dim state As Object

instance.Start(worker, state)
C#
public void Start(
   WaitCallback worker,
   object state
)
Managed Extensions for C++
public: void Start(
   WaitCallback* worker,
   Object* state
)
C++/CLI
public:
void Start(
   WaitCallback^ worker,
   Object^ state
)

Parameters

worker
WaitCallback delegate specifying the function to execute.
state
Information to pass to the worker delegate function; can be null.

Remarks

This method provides an easy means for executing blocking functions on a worker thread. Applications with a UI thread should use this technique to execute processes (like Connect and Read) that can block the UI thread.

The state parameter can be null for cases in which no state information needs to be passed to the worker delegate function.

Unhandled exceptions occurring on the worker thread will be caught and reported in the Error event.

See Also

Reference

Ssh Class
Ssh Members


StartShell Method

[image]
PowerTCP SSH and SFTP for .NET
StartShell Method
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class : StartShell Method

Glossary Item Box

Starts a "dumb" shell.

Overload List

Overload | Description
StartShell() | Starts a "dumb" shell.
StartShell(String,Int32,Int32,Int32,Int32,Byte[]) | Starts a shell on the host with the requested attributes.

See Also

Reference

Ssh Class
Ssh Members


StartShell() Method

[image]
PowerTCP SSH and SFTP for .NET
StartShell() Method
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class > StartShell Method : StartShell() Method

Glossary Item Box

Starts a "dumb" shell.

Syntax

Visual Basic (Declaration)
Public Overloads Function StartShell() As SessionStream
Visual Basic (Usage) Copy Code
Dim instance As Ssh
Dim value As SessionStream

value = instance.StartShell()
C#
public SessionStream StartShell()
Managed Extensions for C++
public: SessionStream* StartShell();
C++/CLI
public:
SessionStream^ StartShell();

Return Value

A SessionStream object that may be read from or written to.

Remarks

Equivalent to calling StartShell("dumb", 0, 0, 0, 0, null). This method is typically used for interactive on-line dumb terminal applications. Use SessionStream.Read to read data sent by the host. Use SessionStream.Write to send user input to the host.

See Also

Reference

Ssh Class
Ssh Members
Overload List


StartShell(String,Int32,Int32,Int32,Int32,Byte[]) Method

[image]
PowerTCP SSH and SFTP for .NET
StartShell(String,Int32,Int32,Int32,Int32,Byte[]) Method
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class > StartShell Method : StartShell(String,Int32,Int32,Int32,Int32,Byte[]) Method

term
The TERM environment variable value (e.g., vt100).
columns
Terminal width, characters (e.g., 80).
rows
Terminal height, characters (e.g., 24).
width
Terminal width, pixels (e.g., 640.)
height
Terminal height, pixels (e.g., 480).
modes
Encoded terminal modes (may be null).

Glossary Item Box

Starts a shell on the host with the requested attributes.

Syntax

Visual Basic (Declaration)
Public Overloads Function StartShell( _
   ByVal term As String, _
   ByVal columns As Integer, _
   ByVal rows As Integer, _
   ByVal width As Integer, _
   ByVal height As Integer, _
   ByVal modes() As Byte _
) As SessionStream
Visual Basic (Usage) Copy Code
Dim instance As Ssh
Dim term As String
Dim columns As Integer
Dim rows As Integer
Dim width As Integer
Dim height As Integer
Dim modes() As Byte
Dim value As SessionStream

value = instance.StartShell(term, columns, rows, width, height, modes)
C#
public SessionStream StartShell(
   string term,
   int columns,
   int rows,
   int width,
   int height,
   byte[] modes
)
Managed Extensions for C++
public: SessionStream* StartShell(
   string* term,
   int columns,
   int rows,
   int width,
   int height,
   byte[]* modes
)
C++/CLI
public:
SessionStream^ StartShell(
   String^ term,
   int columns,
   int rows,
   int width,
   int height,
   array<byte>^ modes
)

Parameters

term
The TERM environment variable value (e.g., vt100).
columns
Terminal width, characters (e.g., 80).
rows
Terminal height, characters (e.g., 24).
width
Terminal width, pixels (e.g., 640.)
height
Terminal height, pixels (e.g., 480).
modes
Encoded terminal modes (may be null).

Return Value

A SessionStream object that may be read from or written to.

Remarks

This method is typically used for interactive on-line terminal emulation applications. Use SessionStream.Read to read data sent by the host. Use SessionStream.Write to send user input to the host.

See Also

Reference

Ssh Class
Ssh Members
Overload List


StartSubSystem Method

[image]
PowerTCP SSH and SFTP for .NET
StartSubSystem Method
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class : StartSubSystem Method

name
The name of the subsystem.

Glossary Item Box

Starts a subsystem on the remote machine. For advanced applications.

Syntax

Visual Basic (Declaration)
Public Function StartSubSystem( _
   ByVal name As String _
) As SessionStream
Visual Basic (Usage) Copy Code
Dim instance As Ssh
Dim name As String
Dim value As SessionStream

value = instance.StartSubSystem(name)
C#
public SessionStream StartSubSystem(
   string name
)
Managed Extensions for C++
public: SessionStream* StartSubSystem(
   string* name
)
C++/CLI
public:
SessionStream^ StartSubSystem(
   String^ name
)

Parameters

name
The name of the subsystem.

Return Value

A SessionStream object.

See Also

Reference

Ssh Class
Ssh Members


Ssh Class Events

[image]
PowerTCP SSH and SFTP for .NET
Ssh Class Events
See Also Send comments on this topic
Dart.Ssh Namespace : Ssh Class

Glossary Item Box

For a list of all members of this type, see Ssh members.

Public Events

 | Name | Description
Public Event | Banner | Raised when the server presents a banner during authentication. (Inherited from Dart.Ssh.SshConnection)
Public Event | Challenge | Raised when the server presents its challenges during 'keyboard-interactive' authentication. (Inherited from Dart.Ssh.SshConnection)
Public Event | Data | Raised when the Marshal method is called by the user.
Public Event | Disposed | (Inherited from System.ComponentModel.Component)
Public Event | Error | Raised when Marshal(Exception) is used or an unhandled Exception is thrown in a worker thread created using Start. (Inherited from Dart.Ssh.ComponentBase)
Public Event | HostKey | Raised when the server presents its hostkey while establishing a connection. (Inherited from Dart.Ssh.SshConnection)
Public Event | Log | Used to log packet-level communications. (Inherited from Dart.Ssh.SshConnection)
Public Event | StateChanged | Raised when the value of the State property changes, or a call to any Authenticate method returns. (Inherited from Dart.Ssh.SshConnection)
Public Event | UserState | Raised when Marshal(String,Object) is used. (Inherited from Dart.Ssh.ComponentBase)
Top

See Also

Reference

Ssh Class
Dart.Ssh Namespace


Data Event

[image]
PowerTCP SSH and SFTP for .NET
Data Event
See Also Send comments on this topic
Dart.Ssh Namespace > Ssh Class : Data Event

Glossary Item Box

Raised when the Marshal method is called by the user.

Syntax

Visual Basic (Declaration)
Public Event Data As Ssh.SshDataEventHandler
Visual Basic (Usage) Copy Code
Dim instance As Ssh
Dim handler As Ssh.SshDataEventHandler

AddHandler instance.Data, handler
C#
public event Ssh.SshDataEventHandler Data
Managed Extensions for C++
public: __event Ssh.SshDataEventHandler* Data
C++/CLI
public:
event Ssh.SshDataEventHandler^ Data

Event Data

The event handler receives an argument of type SshDataEventArgs containing data related to this event. The following SshDataEventArgs properties provide information specific to this event.

Property | Description
Data | Gets data provided by Data and Log events. (Inherited from Dart.Ssh.DataEventArgs)
Message | Returns the message argument provided by the Marshal method. (Inherited from Dart.Ssh.UserStateEventArgs)
Session | Gets the SessionStream the data was read from.
UserState | Returns the user state argument provided by the Marshal method. (Inherited from Dart.Ssh.UserStateEventArgs)

Remarks

This event is always raised on the UI thread so that data can be used with UI components.

See SynchronizingObject for important information on updating UI controls from within this event.

See Also

Reference

Ssh Class
Ssh Members


SshConnection Class

[image]
PowerTCP SSH and SFTP for .NET
SshConnection Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : SshConnection Class

Glossary Item Box

SshConnection provides connection and authentication methods and properties for Sftp and Ssh classes.

Object Model

SshConnection ClassConnection Class

Syntax

Visual Basic (Declaration)
Public Class SshConnection
   Inherits ComponentBase
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
C#
public class SshConnection : ComponentBase
Managed Extensions for C++
public __gc class SshConnection : public ComponentBase
C++/CLI
public ref class SshConnection : public ComponentBase

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Dart.Ssh.ComponentBase
Dart.Ssh.SshConnection
Dart.Ssh.Sftp
Dart.Ssh.Ssh

See Also

Reference

SshConnection Members
Dart.Ssh Namespace


SshConnection Class Members

[image]
PowerTCP SSH and SFTP for .NET
SshConnection Class Members
See Also Properties Methods Events Send comments on this topic
Dart.Ssh Namespace : SshConnection Class

Glossary Item Box

The following tables list the members exposed by SshConnection.

Public Constructors

 | Name | Description
Public Constructor | SshConnection Constructor | Constructor for non-design environments
Top

Public Properties

 | Name | Description
Public Property | AcceptAllHostKeys | When true, all host keys are accepted if not overridden with HostKeyEventArgs.Verified. When false, the HostKey event must be used to verify host keys.
Public Property | Connection | Gets the underlying Connection instance being used for server communications.
Public Property | Container | (Inherited from System.ComponentModel.Component)
Public Property | Encoding | Character encoding used by the component. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Site | (Inherited from System.ComponentModel.Component)
Public Property | State | Gets a value that reflects the current TCP connection state and SSH authentication state.
Public Property | SynchronizingObject | Gets or sets the object used to marshal data to the UI thread (for raising events). (Inherited from Dart.Ssh.ComponentBase)
Public Property | SyncRoot | Gets an object that is used to synchronize access to the upper layer protocol in use. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Tag | Gets or sets an object that stores any user data. (Inherited from Dart.Ssh.ComponentBase)
Public Property | ThreadingModel | Controls the threading model used by the component. (Inherited from Dart.Ssh.ComponentBase)
Top

Protected Properties

 | Name | Description
Protected Property | CanRaiseEvents | (Inherited from System.ComponentModel.Component)
Protected Property | DesignMode | (Inherited from System.ComponentModel.Component)
Protected Property | Events | (Inherited from System.ComponentModel.Component)
Top

Public Methods

 | Name | Description
Public Method | Authenticate | Overloaded. Performs 'keyboard-interactive' authentication.
Public Method | Close | Closes the connection to the SSH-2 server.
Public Method | Connect | Overloaded. Connects to the SSH-2 server specified by Connection.RemoteEndPoint.
Public Method | CreateLocalPortForwarder | Overloaded. Creates a new LocalPortForwarder.
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Deserialize | Deserialize a previously serialized object. (Inherited from Dart.Ssh.ComponentBase)
Public Method | Dispose | Overloaded. Overridden. Releases all resources associated with the object.
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Marshal | Overloaded. Marshals a string and/or object to the UI thread and raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Public Method | OnBanner | Raises the Banner event.
Public Method | OnChallenge | Raises the Challenge event.
Public Method | OnHostKey | Raises the HostKey event.
Public Method | Serialize | Serialize an object to the provided destination stream. (Inherited from Dart.Ssh.ComponentBase)
Public Method | ToString | (Inherited from System.ComponentModel.Component)
Top

Protected Methods

 | Name | Description
Protected Method | Finalize | (Inherited from System.ComponentModel.Component)
Protected Method | GetService | (Inherited from System.ComponentModel.Component)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | OnError | Raises the Error event. (Inherited from Dart.Ssh.ComponentBase)
Protected Method | OnLog | Raises the Log event.
Protected Method | OnStateChanged | Raises the StateChanged event.
Protected Method | OnUserState | Raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Top

Public Events

 | Name | Description
Public Event | Banner | Raised when the server presents a banner during authentication.
Public Event | Challenge | Raised when the server presents its challenges during 'keyboard-interactive' authentication.
Public Event | Disposed | (Inherited from System.ComponentModel.Component)
Public Event | Error | Raised when Marshal(Exception) is used or an unhandled Exception is thrown in a worker thread created using Start. (Inherited from Dart.Ssh.ComponentBase)
Public Event | HostKey | Raised when the server presents its hostkey while establishing a connection.
Public Event | Log | Used to log packet-level communications.
Public Event | StateChanged | Raised when the value of the State property changes, or a call to any Authenticate method returns.
Public Event | UserState | Raised when Marshal(String,Object) is used. (Inherited from Dart.Ssh.ComponentBase)
Top

See Also

Reference

SshConnection Class
Dart.Ssh Namespace


SshConnection Constructor

[image]
PowerTCP SSH and SFTP for .NET
SshConnection Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : SshConnection Constructor

Glossary Item Box

Constructor for non-design environments

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As New SshConnection()
C#
public SshConnection()
Managed Extensions for C++
public: SshConnection();
C++/CLI
public:
SshConnection();

See Also

Reference

SshConnection Class
SshConnection Members


SshConnection Class Methods

[image]
PowerTCP SSH and SFTP for .NET
SshConnection Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : SshConnection Class

Glossary Item Box

For a list of all members of this type, see SshConnection members.

Public Methods

 | Name | Description
Public Method | Authenticate | Overloaded. Performs 'keyboard-interactive' authentication.
Public Method | Close | Closes the connection to the SSH-2 server.
Public Method | Connect | Overloaded. Connects to the SSH-2 server specified by Connection.RemoteEndPoint.
Public Method | CreateLocalPortForwarder | Overloaded. Creates a new LocalPortForwarder.
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Deserialize | Deserialize a previously serialized object. (Inherited from Dart.Ssh.ComponentBase)
Public Method | Dispose | Overloaded. Overridden. Releases all resources associated with the object.
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Marshal | Overloaded. Marshals a string and/or object to the UI thread and raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Public Method | OnBanner | Raises the Banner event.
Public Method | OnChallenge | Raises the Challenge event.
Public Method | OnHostKey | Raises the HostKey event.
Public Method | Serialize | Serialize an object to the provided destination stream. (Inherited from Dart.Ssh.ComponentBase)
Public Method | ToString | (Inherited from System.ComponentModel.Component)
Top

Protected Methods

 | Name | Description
Protected Method | Finalize | (Inherited from System.ComponentModel.Component)
Protected Method | GetService | (Inherited from System.ComponentModel.Component)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | OnError | Raises the Error event. (Inherited from Dart.Ssh.ComponentBase)
Protected Method | OnLog | Raises the Log event.
Protected Method | OnStateChanged | Raises the StateChanged event.
Protected Method | OnUserState | Raises the UserState event. (Inherited from Dart.Ssh.ComponentBase)
Top

See Also

Reference

SshConnection Class
Dart.Ssh Namespace


Authenticate Method

[image]
PowerTCP SSH and SFTP for .NET
Authenticate Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : Authenticate Method

Glossary Item Box

Performs 'keyboard-interactive' authentication.

Overload List

Overload | Description
Authenticate(String,String[]) | Performs 'keyboard-interactive' authentication.
Authenticate(SshLoginData) | A server-driven upper-level authentication method that also automatically performs multi-factor authentication if required.
Authenticate(String) | Performs 'none' authentication, sending only the username to the server.
Authenticate(String,String) | Performs 'password' authentication, sending the username and password to the server.
Authenticate(String,String,String) | Performs 'publickey' authentication.

See Also

Reference

SshConnection Class
SshConnection Members


Authenticate(String,String[]) Method

[image]
PowerTCP SSH and SFTP for .NET
Authenticate(String,String[]) Method
See Also Example Send comments on this topic
Dart.Ssh Namespace > SshConnection Class > Authenticate Method : Authenticate(String,String[]) Method

username
The username used for authentication.
submethods
An array of preferred authentication submethods to suggest to the server. May be 0-length or null.

Glossary Item Box

Performs 'keyboard-interactive' authentication.

Syntax

Visual Basic (Declaration)
Public Overloads Sub Authenticate( _
   ByVal username As String, _
   ByVal submethods() As String _
)
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim username As String
Dim submethods() As String

instance.Authenticate(username, submethods)
C#
public void Authenticate(
   string username,
   string[] submethods
)
Managed Extensions for C++
public: void Authenticate(
   string* username,
   string*[]* submethods
)
C++/CLI
public:
void Authenticate(
   String^ username,
   array<String^>^ submethods
)

Parameters

username
The username used for authentication.
submethods
An array of preferred authentication submethods to suggest to the server. May be 0-length or null.

Exceptions

Exception | Description
System.Security.Authentication.AuthenticationException | Authentication was unsuccessful. The server does not support this authentication method, or the arguments or challenge response(s) are invalid.

Remarks

Server interpretation of submethods is implementation-dependent. See RFC 4256 for more details.

Challenge will be raised with challenges generated by the server. Responses provided in your handler are sent back to the server. The challenge event can be raised more than once during the invocation of this method (e.g., if the server replies to the response with another challenge...).

Note: Some SSH servers advertise 'keyboard-interactive' but will deny its use.

The technique used to invoke this method is dependent upon the value of ThreadingModel. If ThreadingModel.Free, this method executes on the current thread and returns when complete (this is standard for creating applications in multi-threading environments like .NET). If ThreadingModel.ApartmentBlocking, this method blocks and processes windows UI messages while a worker thread executes (this is useful for making a simple blocking call in an apartment model environment like VB6). If ThreadingModel.ApartmentAsync, this method immediately returns after starting a worker thread that executes asynchronously (this is useful for creating advanced communications applications in an apartment model environment like VB6). The StateChanged event will be raised upon completion, or the Error event raised if an exception is thrown.

To support multi-factor authentication, the value of State can be checked after this method completes. If it returns ConnectionState.ConnectedAndPartiallyAuthenticated, further authentication is required and Connection.GetRemainingAuthMethods can be checked for a list of authentication methods that the server will accept as the subsequent authentication factor.

Example

The example below demonstrates 'keyboard-interactive' authentication with the Challenge event.
C# Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
    //Connect to the server
    ssh1.Connection.RemoteEndPoint.HostNameOrAddress = myServerHostname;
    ssh1.Connection.RemoteEndPoint.Port = myServerPort; //Usually 22
    ssh1.Connect();

    ssh1.Authenticate(myUsername, new string[] { });
}

private void ssh1_Challenge(object sender, ChallengeEventArgs e)
{
    for (int i = 0; i <= e.Prompt.Length - 1; i++)
    {
        if (e.Prompt[i] == "password:")
            e.Response[i] = myPassword;
        //If the server presents additional challenges, populate each response here
    }
}
Visual Basic Copy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
    'Connect to the server
    ssh1.Connection.RemoteEndPoint.HostNameOrAddress = myServerHostname
    ssh1.Connection.RemoteEndPoint.Port = myServerPort 'Usually 22
    ssh1.Connect()

    ssh1.Authenticate(myUsername, New String() { })
End Sub

Private Sub ssh1_Challenge(ByVal sender As Object, ByVal e As ChallengeEventArgs) Handles ssh1.Challenge
    For i As Integer = 0 To e.Prompt.Length - 1
        If e.Prompt(i) = "password:" Then
            e.Response(i) = myPassword
        End If
        'If the server presents additional challenges, populate each response here
    Next i
End Sub

See Also

Reference

SshConnection Class
SshConnection Members
Overload List


Authenticate(SshLoginData) Method

[image]
PowerTCP SSH and SFTP for .NET
Authenticate(SshLoginData) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class > Authenticate Method : Authenticate(SshLoginData) Method

loginData
Parameters to use for authentication.

Glossary Item Box

A server-driven upper-level authentication method that also automatically performs multi-factor authentication if required.

Syntax

Visual Basic (Declaration)
Public Overloads Sub Authenticate( _
   ByVal loginData As SshLoginData _
)
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim loginData As SshLoginData

instance.Authenticate(loginData)
C#
public void Authenticate(
   SshLoginData loginData
)
Managed Extensions for C++
public: void Authenticate(
   SshLoginData* loginData
)
C++/CLI
public:
void Authenticate(
   SshLoginData^ loginData
)

Parameters

loginData
Parameters to use for authentication.

Exceptions

Exception | Description
System.Security.Authentication.AuthenticationException | Authentication was unsuccessful.
System.ArgumentException | One or more of the details provided in loginData is invalid, or required and not provided.

Remarks

This method relies upon 'none' authentication to request the available authentication methods, and is driven by the server's response and the provided authentication details. The authentication method used will be selected in the order of preference: 'publickey', 'password', 'keyboard-interactive', excluding any not supported by the server or not possible with the provided authentication details. If the server reports partial success for any authentication attempt, multi-factor authentication will be attempted based upon the server's available authentication methods and the provided authentication details until authentication succeeds or an exception is thrown. This automatic multi-factor authentication is limited to 20 attempts.

If keyboard-interactive authentication is used by this method, a Challenge event handler is not required if the server only prompts for the password and loginData.Password is populated; in all other cases, a handler is required to sucessfully complete authentication. If the Challenge event is handled, the response for the password prompt will be pre-populated with the password. Note: This method will only pre-populate a response for the first prompt that contains 'password' (case-insensitive); alternative password prompts must be handled manually in the Challenge event.

The technique used to invoke this method is dependent upon the value of ThreadingModel. If ThreadingModel.Free, this method executes on the current thread and returns when complete (this is standard for creating applications in multi-threading environments like .NET). If ThreadingModel.ApartmentBlocking, this method blocks and processes windows UI messages while a worker thread executes (this is useful for making a simple blocking call in an apartment model environment like VB6). If ThreadingModel.ApartmentAsync, this method immediately returns after starting a worker thread that executes asynchronously (this is useful for creating advanced communications applications in an apartment model environment like VB6). The StateChanged event will be raised upon completion, or the Error event raised if an exception is thrown.

Note: Server support of the 'none' authentication method will never be announced by the server per RFC 4252.

See Also

Reference

SshConnection Class
SshConnection Members
Overload List


Authenticate(String) Method

[image]
PowerTCP SSH and SFTP for .NET
Authenticate(String) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class > Authenticate Method : Authenticate(String) Method

username
The username used for authentication.

Glossary Item Box

Performs 'none' authentication, sending only the username to the server.

Syntax

Visual Basic (Declaration)
Public Overloads Sub Authenticate( _
   ByVal username As String _
)
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim username As String

instance.Authenticate(username)
C#
public void Authenticate(
   string username
)
Managed Extensions for C++
public: void Authenticate(
   string* username
)
C++/CLI
public:
void Authenticate(
   String^ username
)

Parameters

username
The username used for authentication.

Exceptions

Exception | Description
System.Security.Authentication.AuthenticationException | Authentication was unsuccessful. The server does not support this authentication method, or the username is invalid.

Remarks

Servers will not typically accept this authentication method as the sole authentication factor, and will never announce it (the 'none' token will never show up in the list returned by Connection.GetRemainingAuthMethods).

The technique used to invoke this method is dependent upon the value of ThreadingModel. If ThreadingModel.Free, this method executes on the current thread and returns when complete (this is standard for creating applications in multi-threading environments like .NET). If ThreadingModel.ApartmentBlocking, this method blocks and processes windows UI messages while a worker thread executes (this is useful for making a simple blocking call in an apartment model environment like VB6). If ThreadingModel.ApartmentAsync, this method immediately returns after starting a worker thread that executes asynchronously (this is useful for creating advanced communications applications in an apartment model environment like VB6). The StateChanged event will be raised upon completion, or the Error event raised if an exception is thrown.

To support multi-factor authentication, the value of State can be checked after this method completes. If it returns ConnectionState.ConnectedAndPartiallyAuthenticated, further authentication is required and Connection.GetRemainingAuthMethods can be checked for a list of authentication methods that the server will accept as the subsequent authentication factor.

See Also

Reference

SshConnection Class
SshConnection Members
Overload List


Authenticate(String,String) Method

[image]
PowerTCP SSH and SFTP for .NET
Authenticate(String,String) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class > Authenticate Method : Authenticate(String,String) Method

username
The username to use for authentication.
password
The password to use for authentication.

Glossary Item Box

Performs 'password' authentication, sending the username and password to the server.

Syntax

Visual Basic (Declaration)
Public Overloads Sub Authenticate( _
   ByVal username As String, _
   ByVal password As String _
)
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim username As String
Dim password As String

instance.Authenticate(username, password)
C#
public void Authenticate(
   string username,
   string password
)
Managed Extensions for C++
public: void Authenticate(
   string* username,
   string* password
)
C++/CLI
public:
void Authenticate(
   String^ username,
   String^ password
)

Parameters

username
The username to use for authentication.
password
The password to use for authentication.

Exceptions

Exception | Description
System.Security.Authentication.AuthenticationException | Authentication was unsuccessful. The server does not support this authentication method or the arguments are invalid.

Remarks

Connection.GetRemainingAuthMethods can be used to confirm if 'password' authentication is an available authentication method; some servers accept only 'publickey' and/or 'keyboard-interactive' authentication.

The technique used to invoke this method is dependent upon the value of ThreadingModel. If ThreadingModel.Free, this method executes on the current thread and returns when complete (this is standard for creating applications in multi-threading environments like .NET). If ThreadingModel.ApartmentBlocking, this method blocks and processes windows UI messages while a worker thread executes (this is useful for making a simple blocking call in an apartment model environment like VB6). If ThreadingModel.ApartmentAsync, this method immediately returns after starting a worker thread that executes asynchronously (this is useful for creating advanced communications applications in an apartment model environment like VB6). The StateChanged event will be raised upon completion, or the Error event raised if an exception is thrown.

To support multi-factor authentication, the value of State can be checked after this method completes. If it returns ConnectionState.ConnectedAndPartiallyAuthenticated, further authentication is required and Connection.GetRemainingAuthMethods can be checked for a list of authentication methods that the server will accept as the subsequent authentication factor.

See Also

Reference

SshConnection Class
SshConnection Members
Overload List


Authenticate(String,String,String) Method

[image]
PowerTCP SSH and SFTP for .NET
Authenticate(String,String,String) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class > Authenticate Method : Authenticate(String,String,String) Method

username
The username used for authentication.
pemPassPhrase
Passphrase for the PEM private key. Can be null or empty if the private key is not encrypted.
pemPrivateKey
PEM-encoded DSA/RSA private key in OpenSSH key format.

Glossary Item Box

Performs 'publickey' authentication.

Syntax

Visual Basic (Declaration)
Public Overloads Sub Authenticate( _
   ByVal username As String, _
   ByVal pemPassPhrase As String, _
   ByVal pemPrivateKey As String _
)
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim username As String
Dim pemPassPhrase As String
Dim pemPrivateKey As String

instance.Authenticate(username, pemPassPhrase, pemPrivateKey)
C#
public void Authenticate(
   string username,
   string pemPassPhrase,
   string pemPrivateKey
)
Managed Extensions for C++
public: void Authenticate(
   string* username,
   string* pemPassPhrase,
   string* pemPrivateKey
)
C++/CLI
public:
void Authenticate(
   String^ username,
   String^ pemPassPhrase,
   String^ pemPrivateKey
)

Parameters

username
The username used for authentication.
pemPassPhrase
Passphrase for the PEM private key. Can be null or empty if the private key is not encrypted.
pemPrivateKey
PEM-encoded DSA/RSA private key in OpenSSH key format.

Exceptions

Exception | Description
System.Security.Authentication.AuthenticationException | Authentication was unsuccessful. The server does not support this authentication method or the arguments are invalid.

Remarks

Public key authentication method works by signing a challenge sent by the server. The signature is either DSA or RSA based, depending upon on the type of private key you specify; a DSA or RSA private key in PEM format (must contain a "-----BEGIN DSA PRIVATE KEY-----" or "-----BEGIN RSA PRIVATE KEY-----" tag). The method is called 'publickey' in the SSH-2 protocol specification, however it actually requires a private key to be provided (the server will use the public key counterpart to verify the signature).

The private key string may also be encrypted ("Proc-Type: 4,ENCRYPTED"). The library supports DES-CBC and DES-EDE3-CBC encryption, as well as the more exotic PEM encryptions AES-128-CBC, AES-192-CBC and AES-256-CBC.

NOTE PUTTY USERS: Even though your key file may start with "-----BEGIN..." it is not in the expected format. You must convert it to the OpenSSH key format with the "puttygen" tool (can be downloaded from the Putty website). Load your key and use the "Conversions/Export OpenSSH key" functionality to produce a compatible PEM file.

The technique used to invoke this method is dependent upon the value of ThreadingModel. If ThreadingModel.Free, this method executes on the current thread and returns when complete (this is standard for creating applications in multi-threading environments like .NET). If ThreadingModel.ApartmentBlocking, this method blocks and processes windows UI messages while a worker thread executes (this is useful for making a simple blocking call in an apartment model environment like VB6). If ThreadingModel.ApartmentAsync, this method immediately returns after starting a worker thread that executes asynchronously (this is useful for creating advanced communications applications in an apartment model environment like VB6). The StateChanged event will be raised upon completion, or the Error event raised if an exception is thrown.

To support multi-factor authentication, the value of State can be checked after this method completes. If it returns ConnectionState.ConnectedAndPartiallyAuthenticated, further authentication is required and Connection.GetRemainingAuthMethods can be checked for a list of authentication methods that the server will accept as the subsequent authentication factor.

See Also

Reference

SshConnection Class
SshConnection Members
Overload List


Close Method

[image]
PowerTCP SSH and SFTP for .NET
Close Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : Close Method

Glossary Item Box

Closes the connection to the SSH-2 server.

Syntax

Visual Basic (Declaration)
Public Overridable Sub Close()
Visual Basic (Usage) Copy Code
Dim instance As SshConnection

instance.Close()
C#
public virtual void Close()
Managed Extensions for C++
public: virtual void Close();
C++/CLI
public:
virtual void Close();

Remarks

All assigned sessions will be closed. Can be called at any time. Should be called once a connection is no longer needed - otherwise the receiver thread may run forever.

See Also

Reference

SshConnection Class
SshConnection Members


Connect Method

[image]
PowerTCP SSH and SFTP for .NET
Connect Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : Connect Method

Glossary Item Box

Connects to the SSH-2 server specified by Connection.RemoteEndPoint.

Overload List

Overload | Description
Connect() | Connects to the SSH-2 server specified by Connection.RemoteEndPoint.
Connect(Int32) | Connects to the SSH-2 server specified by Connection.RemoteEndPoint.

See Also

Reference

SshConnection Class
SshConnection Members


Connect() Method

[image]
PowerTCP SSH and SFTP for .NET
Connect() Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class > Connect Method : Connect() Method

Glossary Item Box

Connects to the SSH-2 server specified by Connection.RemoteEndPoint.

Syntax

Visual Basic (Declaration)
Public Overloads Sub Connect()
Visual Basic (Usage) Copy Code
Dim instance As SshConnection

instance.Connect()
C#
public void Connect()
Managed Extensions for C++
public: void Connect();
C++/CLI
public:
void Connect();

Exceptions

Exception | Description
System.IO.IOException | If any problem occurs, e.g., the server's host key is not accepted by the user's HostKey event handler or there is problem during the initial crypto setup (e.g., the signature sent by the server is wrong).
System.TimeoutException | The TCP connection and key exchange could not be completed within the specified timeout period.
HttpProxyException | The specified HTTP proxy failed to operate as expected.

Remarks

Use Connection.RemoteEndPoint and Connection.LocalEndPoint to set remote and local address and port.

When the server presents its host key, raises the HostKey event to ask for permission to proceed. If no handler is registered for the HostKey event, then any host key will be accepted - this is NOT recommended, since it makes man-in-the-middle attacks VERY easy (somebody could put a proxy SSH server between you and the real server).

Note: The HostKey event is raised before doing any crypto calculations (i.e., diffie-hellman). Therefore, if you do not like the presented host key then no CPU cycles are wasted (and the server has less information about the client).

However, it is still possible that the server presented a fake host key: the server cheated (typically a sign for a man-in-the-middle attack) and is not able to generate a signature that matches its host key. The library will detect such a scenario later when checking the signature (the signature cannot be checked before having completed the diffie-hellman exchange).

Note 2: See the ComponentBase.SynchronizingObject property for important information on updating UI controls from within the HostKey event.

Note 3: This method will block as long as the key exchange of the underlying connection has not been completed.

The technique used to invoke this method is dependent upon the value of ThreadingModel. If ThreadingModel.Free, this method executes on the current thread and returns when complete (this is standard for creating applications in multi-threading environments like .NET). If ThreadingModel.ApartmentBlocking, this method blocks and processes windows UI messages while a worker thread executes (this is useful for making a simple blocking call in an apartment model environment like VB6). If ThreadingModel.ApartmentAsync, this method immediately returns after starting a worker thread that executes asynchronously (this is useful for creating advanced communications applications in an apartment model environment like VB6). The StateChanged event will be raised upon completion, or the Error event raised if an exception is thrown.

See Also

Reference

SshConnection Class
SshConnection Members
Overload List


Connect(Int32) Method

[image]
PowerTCP SSH and SFTP for .NET
Connect(Int32) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class > Connect Method : Connect(Int32) Method

timeout
Timeout for complete connection establishment (non-negative), in milliseconds.

Glossary Item Box

Connects to the SSH-2 server specified by Connection.RemoteEndPoint.

Syntax

Visual Basic (Declaration)
Public Overloads Sub Connect( _
   ByVal timeout As Integer _
)
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim timeout As Integer

instance.Connect(timeout)
C#
public void Connect(
   int timeout
)
Managed Extensions for C++
public: void Connect(
   int timeout
)
C++/CLI
public:
void Connect(
   int timeout
)

Parameters

timeout
Timeout for complete connection establishment (non-negative), in milliseconds.

Exceptions

Exception | Description
System.IO.IOException | If any problem occurs, e.g., the server's host key is not accepted by the user's HostKey event handler or there is problem during the initial crypto setup (e.g., the signature sent by the server is wrong).
System.TimeoutException | The TCP connection and key exchange could not be completed within the specified timeout period.
HttpProxyException | The specified HTTP proxy failed to operate as expected.

Remarks

Use Connection.RemoteEndPoint and Connection.LocalEndPoint to set remote and local address and port.

When the server presents its host key, raises the HostKey event to ask for permission to proceed. If no handler is registered for the HostKey event, then any host key will be accepted - this is NOT recommended, since it makes man-in-the-middle attacks VERY easy (somebody could put a proxy SSH server between you and the real server).

Timeout indicates the maximum time to wait before raising an error during the two phases of the connection process: connection to the host and key exchange. Set to 0 to use the system default for connection to the host (~20 seconds) and the default of 6 seconds for key exchange. The timeout period begins when Connect is called and ends after the first key-exchange round.

Note: The HostKey event is raised before doing any crypto calculations (i.e., diffie-hellman). Therefore, if you do not like the presented host key then no CPU cycles are wasted (and the server has less information about us).

However, it is still possible that the server presented a fake host key: the server cheated (typically a sign for a man-in-the-middle attack) and is not able to generate a signature that matches its host key. The library will detect such a scenario later when checking the signature (the signature cannot be checked before having completed the diffie-hellman exchange).

Note 2: See the ComponentBase.SynchronizingObject property for important information on updating UI controls from within the HostKey event.

Note 3: This method will block as long as the key exchange of the underlying connection has not been completed or the timeout period expires.

The technique used to invoke this method is dependent upon the value of ThreadingModel. If ThreadingModel.Free, this method executes on the current thread and returns when complete (this is standard for creating applications in multi-threading environments like .NET). If ThreadingModel.ApartmentBlocking, this method blocks and processes windows UI messages while a worker thread executes (this is useful for making a simple blocking call in an apartment model environment like VB6). If ThreadingModel.ApartmentAsync, this method immediately returns after starting a worker thread that executes asynchronously (this is useful for creating advanced communications applications in an apartment model environment like VB6). The StateChanged event will be raised upon completion, or the Error event raised if an exception is thrown.

See Also

Reference

SshConnection Class
SshConnection Members
Overload List


CreateLocalPortForwarder Method

[image]
PowerTCP SSH and SFTP for .NET
CreateLocalPortForwarder Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : CreateLocalPortForwarder Method

Glossary Item Box

Creates a new LocalPortForwarder.

Overload List

Overload | Description
CreateLocalPortForwarder(Int32,String,Int32) | Creates a new LocalPortForwarder.
CreateLocalPortForwarder(IPEndPoint,String,Int32) | Creates a new LocalPortForwarder.

See Also

Reference

SshConnection Class
SshConnection Members


CreateLocalPortForwarder(Int32,String,Int32) Method

[image]
PowerTCP SSH and SFTP for .NET
CreateLocalPortForwarder(Int32,String,Int32) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class > CreateLocalPortForwarder Method : CreateLocalPortForwarder(Int32,String,Int32) Method

local_port
The local port the LocalPortForwarder shall bind to.
host_to_connect
The target address (IP or hostname).
port_to_connect
The target port.

Glossary Item Box

Creates a new LocalPortForwarder.

Syntax

Visual Basic (Declaration)
Public Overloads Function CreateLocalPortForwarder( _
   ByVal local_port As Integer, _
   ByVal host_to_connect As String, _
   ByVal port_to_connect As Integer _
) As LocalPortForwarder
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim local_port As Integer
Dim host_to_connect As String
Dim port_to_connect As Integer
Dim value As LocalPortForwarder

value = instance.CreateLocalPortForwarder(local_port, host_to_connect, port_to_connect)
C#
public LocalPortForwarder CreateLocalPortForwarder(
   int local_port,
   string host_to_connect,
   int port_to_connect
)
Managed Extensions for C++
public: LocalPortForwarder* CreateLocalPortForwarder(
   int local_port,
   string* host_to_connect,
   int port_to_connect
)
C++/CLI
public:
LocalPortForwarder^ CreateLocalPortForwarder(
   int local_port,
   String^ host_to_connect,
   int port_to_connect
)

Parameters

local_port
The local port the LocalPortForwarder shall bind to.
host_to_connect
The target address (IP or hostname).
port_to_connect
The target port.

Return Value

A LocalPortForwarder object

Exceptions

Exception | Description
System.InvalidOperationException | Thrown if there is an error condition, e.g., if the underlying connection is closed or not authenticated.

Remarks

A LocalPortForwarder forwards TCP/IP connections that arrive at a local port via the secure tunnel to another host (which may or may not be identical to the remote SSH-2 server).

This method must only be called after the authentication step has successfully completed. There is no limit on the number of concurrent forwardings, however some servers may impose such a limit.

See Also

Reference

SshConnection Class
SshConnection Members
Overload List


CreateLocalPortForwarder(IPEndPoint,String,Int32) Method

[image]
PowerTCP SSH and SFTP for .NET
CreateLocalPortForwarder(IPEndPoint,String,Int32) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class > CreateLocalPortForwarder Method : CreateLocalPortForwarder(IPEndPoint,String,Int32) Method

addr
The IPEndPoint where the local socket shall be bound to.
host_to_connect
The target address (IP or hostname).
port_to_connect
The target port.

Glossary Item Box

Creates a new LocalPortForwarder.

Syntax

Visual Basic (Declaration)
Public Overloads Function CreateLocalPortForwarder( _
   ByVal addr As IPEndPoint, _
   ByVal host_to_connect As String, _
   ByVal port_to_connect As Integer _
) As LocalPortForwarder
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim addr As IPEndPoint
Dim host_to_connect As String
Dim port_to_connect As Integer
Dim value As LocalPortForwarder

value = instance.CreateLocalPortForwarder(addr, host_to_connect, port_to_connect)
C#
public LocalPortForwarder CreateLocalPortForwarder(
   IPEndPoint addr,
   string host_to_connect,
   int port_to_connect
)
Managed Extensions for C++
public: LocalPortForwarder* CreateLocalPortForwarder(
   IPEndPoint* addr,
   string* host_to_connect,
   int port_to_connect
)
C++/CLI
public:
LocalPortForwarder^ CreateLocalPortForwarder(
   IPEndPoint^ addr,
   String^ host_to_connect,
   int port_to_connect
)

Parameters

addr
The IPEndPoint where the local socket shall be bound to.
host_to_connect
The target address (IP or hostname).
port_to_connect
The target port.

Return Value

A LocalPortForwarder object

Exceptions

Exception | Description
System.InvalidOperationException | Thrown if there is an error condition, e.g., if the underlying connection is closed or not authenticated.

Remarks

A LocalPortForwarder forwards TCP/IP connections that arrive at a local port via the secure tunnel to another host (which may or may not be identical to the remote SSH-2 server).

This method must only be called after the authentication step has successfully completed. There is no limit on the number of concurrent forwardings, however some servers may impose such a limit.

See Also

Reference

SshConnection Class
SshConnection Members
Overload List


Dispose Method

[image]
PowerTCP SSH and SFTP for .NET
Dispose Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : Dispose Method

Glossary Item Box

Releases all resources associated with the object.

Overload List

Overload | Description
Dispose(Boolean) | Releases all resources associated with the object.
Dispose() | (Inherited from System.ComponentModel.Component)

See Also

Reference

SshConnection Class
SshConnection Members


Dispose(Boolean) Method

[image]
PowerTCP SSH and SFTP for .NET
Dispose(Boolean) Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class > Dispose Method : Dispose(Boolean) Method

disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.

Glossary Item Box

Releases all resources associated with the object.

Syntax

Visual Basic (Declaration)
Protected Overloads Overrides Sub Dispose( _
   ByVal disposing As Boolean _
)
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim disposing As Boolean

instance.Dispose(disposing)
C#
protected override void Dispose(
   bool disposing
)
Managed Extensions for C++
protected: void Dispose(
   bool disposing
) override
C++/CLI
protected:
void Dispose(
   bool disposing
) override

Parameters

disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.

Remarks

This method abruptly aborts the connection and releases all resources.

See Also

Reference

SshConnection Class
SshConnection Members
Overload List


OnBanner Method

[image]
PowerTCP SSH and SFTP for .NET
OnBanner Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : OnBanner Method

e
A BannerEventArgs that contains the event data.

Glossary Item Box

Raises the Banner event.

Syntax

Visual Basic (Declaration)
Public Overridable Sub OnBanner( _
   ByVal e As BannerEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim e As BannerEventArgs

instance.OnBanner(e)
C#
public virtual void OnBanner(
   BannerEventArgs e
)
Managed Extensions for C++
public: virtual void OnBanner(
   BannerEventArgs* e
)
C++/CLI
public:
virtual void OnBanner(
   BannerEventArgs^ e
)

Parameters

e
A BannerEventArgs that contains the event data.

Remarks

Raising an event invokes the event handler through a delegate.

Note to Inheritors: When overriding OnBanner in a derived class, be sure to call the base class OnBanner method so that registered delegates receive the event.

See the ComponentBase.SynchronizingObject property for important information on updating UI controls from within derived classes.

See Also

Reference

SshConnection Class
SshConnection Members


OnChallenge Method

[image]
PowerTCP SSH and SFTP for .NET
OnChallenge Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : OnChallenge Method

e
A ChallengeEventArgs that contains the event data.

Glossary Item Box

Raises the Challenge event.

Syntax

Visual Basic (Declaration)
Public Overridable Sub OnChallenge( _
   ByVal e As ChallengeEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim e As ChallengeEventArgs

instance.OnChallenge(e)
C#
public virtual void OnChallenge(
   ChallengeEventArgs e
)
Managed Extensions for C++
public: virtual void OnChallenge(
   ChallengeEventArgs* e
)
C++/CLI
public:
virtual void OnChallenge(
   ChallengeEventArgs^ e
)

Parameters

e
A ChallengeEventArgs that contains the event data.

Remarks

Raising an event invokes the event handler through a delegate.

Note to Inheritors: When overriding OnChallenge in a derived class, be sure to call the base class OnChallenge method so that registered delegates receive the event.

See the ComponentBase.SynchronizingObject property for important information on updating UI controls from within derived classes.

See Also

Reference

SshConnection Class
SshConnection Members


OnHostKey Method

[image]
PowerTCP SSH and SFTP for .NET
OnHostKey Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : OnHostKey Method

e
A HostKeyEventArgs that contains the event data.

Glossary Item Box

Raises the HostKey event.

Syntax

Visual Basic (Declaration)
Public Overridable Sub OnHostKey( _
   ByVal e As HostKeyEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim e As HostKeyEventArgs

instance.OnHostKey(e)
C#
public virtual void OnHostKey(
   HostKeyEventArgs e
)
Managed Extensions for C++
public: virtual void OnHostKey(
   HostKeyEventArgs* e
)
C++/CLI
public:
virtual void OnHostKey(
   HostKeyEventArgs^ e
)

Parameters

e
A HostKeyEventArgs that contains the event data.

Remarks

Raising an event invokes the event handler through a delegate.

Note to Inheritors: When overriding OnHostKey in a derived class, be sure to call the base class OnHostKey method so that registered delegates receive the event.

See the ComponentBase.SynchronizingObject property for important information on updating UI controls from within derived classes.

See Also

Reference

SshConnection Class
SshConnection Members


OnLog Method

[image]
PowerTCP SSH and SFTP for .NET
OnLog Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : OnLog Method

e
A LogEventArgs object containing packet logging information.

Glossary Item Box

Raises the Log event.

Syntax

Visual Basic (Declaration)
Protected Overridable Sub OnLog( _
   ByVal e As LogEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim e As LogEventArgs

instance.OnLog(e)
C#
protected virtual void OnLog(
   LogEventArgs e
)
Managed Extensions for C++
protected: virtual void OnLog(
   LogEventArgs* e
)
C++/CLI
protected:
virtual void OnLog(
   LogEventArgs^ e
)

Parameters

e
A LogEventArgs object containing packet logging information.

Remarks

Raising an event invokes the event handler through a delegate. The OnLog method will be called on the same thread the operation is using.

The OnLog method allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Note to Inheritors: When overriding OnLog in a derived class, be sure to call the base class OnLog method, so that registered delegates receive the event.

See the SynchronizingObject property for important information on updating UI controls from within derived classes and events.

See Also

Reference

SshConnection Class
SshConnection Members


OnStateChanged Method

[image]
PowerTCP SSH and SFTP for .NET
OnStateChanged Method
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : OnStateChanged Method

e
An EventArgs that contains the event data.

Glossary Item Box

Raises the StateChanged event.

Syntax

Visual Basic (Declaration)
Protected Overridable Sub OnStateChanged( _
   ByVal e As BaseEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim e As BaseEventArgs

instance.OnStateChanged(e)
C#
protected virtual void OnStateChanged(
   BaseEventArgs e
)
Managed Extensions for C++
protected: virtual void OnStateChanged(
   BaseEventArgs* e
)
C++/CLI
protected:
virtual void OnStateChanged(
   BaseEventArgs^ e
)

Parameters

e
An EventArgs that contains the event data.

Remarks

Raising an event invokes the event handler through a delegate.

Note to Inheritors: When overriding StateChanged in a derived class, be sure to call the base class StateChanged method so that registered delegates receive the event.

See the ComponentBase.SynchronizingObject property for important information on updating UI controls from within derived classes.

See Also

Reference

SshConnection Class
SshConnection Members


SshConnection Class Properties

[image]
PowerTCP SSH and SFTP for .NET
SshConnection Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : SshConnection Class

Glossary Item Box

For a list of all members of this type, see SshConnection members.

Public Properties

 | Name | Description
Public Property | AcceptAllHostKeys | When true, all host keys are accepted if not overridden with HostKeyEventArgs.Verified. When false, the HostKey event must be used to verify host keys.
Public Property | Connection | Gets the underlying Connection instance being used for server communications.
Public Property | Container | (Inherited from System.ComponentModel.Component)
Public Property | Encoding | Character encoding used by the component. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Site | (Inherited from System.ComponentModel.Component)
Public Property | State | Gets a value that reflects the current TCP connection state and SSH authentication state.
Public Property | SynchronizingObject | Gets or sets the object used to marshal data to the UI thread (for raising events). (Inherited from Dart.Ssh.ComponentBase)
Public Property | SyncRoot | Gets an object that is used to synchronize access to the upper layer protocol in use. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Tag | Gets or sets an object that stores any user data. (Inherited from Dart.Ssh.ComponentBase)
Public Property | ThreadingModel | Controls the threading model used by the component. (Inherited from Dart.Ssh.ComponentBase)
Top

Protected Properties

 | Name | Description
Protected Property | CanRaiseEvents | (Inherited from System.ComponentModel.Component)
Protected Property | DesignMode | (Inherited from System.ComponentModel.Component)
Protected Property | Events | (Inherited from System.ComponentModel.Component)
Top

See Also

Reference

SshConnection Class
Dart.Ssh Namespace


AcceptAllHostKeys Property

[image]
PowerTCP SSH and SFTP for .NET
AcceptAllHostKeys Property
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : AcceptAllHostKeys Property

Glossary Item Box

When true, all host keys are accepted if not overridden with HostKeyEventArgs.Verified. When false, the HostKey event must be used to verify host keys.

Syntax

Visual Basic (Declaration)
<DefaultValueAttribute()>
Public Property AcceptAllHostKeys As Boolean
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim value As Boolean

instance.AcceptAllHostKeys = value

value = instance.AcceptAllHostKeys
C#
[DefaultValue()]
public bool AcceptAllHostKeys {get; set;}
Managed Extensions for C++
[DefaultValue()]
public: __property bool get_AcceptAllHostKeys();
public: __property void set_AcceptAllHostKeys(
   bool value
);
C++/CLI
[DefaultValue()]
public:
property bool AcceptAllHostKeys {
   bool get();
   void set (    bool value);
}

See Also

Reference

SshConnection Class
SshConnection Members


Connection Property

[image]
PowerTCP SSH and SFTP for .NET
Connection Property
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : Connection Property

Glossary Item Box

Gets the underlying Connection instance being used for server communications.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Connection As Connection
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim value As Connection

value = instance.Connection
C#
public Connection Connection {get;}
Managed Extensions for C++
public: __property Connection* get_Connection();
C++/CLI
public:
property Connection^ Connection {
   Connection^ get();
}

Remarks

This property can be used to control and report on authentication and encryption algorithms being used. It is created by the application and submitted as a parameter to the Connect method.

See Also

Reference

SshConnection Class
SshConnection Members


State Property

[image]
PowerTCP SSH and SFTP for .NET
State Property
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : State Property

Glossary Item Box

Gets a value that reflects the current TCP connection state and SSH authentication state.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property State As ConnectionState
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim value As ConnectionState

value = instance.State
C#
public ConnectionState State {get;}
Managed Extensions for C++
public: __property ConnectionState get_State();
C++/CLI
public:
property ConnectionState State {
   ConnectionState get();
}

Remarks

If this property returns ConnectionState.ConnectedAndPartiallyAuthenticated, Connection.GetRemainingAuthMethods may be used to get a list of the authentication methods your server supports at the current stage of the authentication process.

The calling application can be notified of a change in this value by registering a delegate with the StateChanged event.

See Also

Reference

SshConnection Class
SshConnection Members


SshConnection Class Events

[image]
PowerTCP SSH and SFTP for .NET
SshConnection Class Events
See Also Send comments on this topic
Dart.Ssh Namespace : SshConnection Class

Glossary Item Box

For a list of all members of this type, see SshConnection members.

Public Events

 | Name | Description
Public Event | Banner | Raised when the server presents a banner during authentication.
Public Event | Challenge | Raised when the server presents its challenges during 'keyboard-interactive' authentication.
Public Event | Disposed | (Inherited from System.ComponentModel.Component)
Public Event | Error | Raised when Marshal(Exception) is used or an unhandled Exception is thrown in a worker thread created using Start. (Inherited from Dart.Ssh.ComponentBase)
Public Event | HostKey | Raised when the server presents its hostkey while establishing a connection.
Public Event | Log | Used to log packet-level communications.
Public Event | StateChanged | Raised when the value of the State property changes, or a call to any Authenticate method returns.
Public Event | UserState | Raised when Marshal(String,Object) is used. (Inherited from Dart.Ssh.ComponentBase)
Top

See Also

Reference

SshConnection Class
Dart.Ssh Namespace


Banner Event

[image]
PowerTCP SSH and SFTP for .NET
Banner Event
See Also Example Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : Banner Event

Glossary Item Box

Raised when the server presents a banner during authentication.

Syntax

Visual Basic (Declaration)
Public Event Banner As SshConnection.BannerEventHandler
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim handler As SshConnection.BannerEventHandler

AddHandler instance.Banner, handler
C#
public event SshConnection.BannerEventHandler Banner
Managed Extensions for C++
public: __event SshConnection.BannerEventHandler* Banner
C++/CLI
public:
event SshConnection.BannerEventHandler^ Banner

Event Data

The event handler receives an argument of type BannerEventArgs containing data related to this event. The following BannerEventArgs properties provide information specific to this event.

Property | Description
Accept | Set to false to refuse the banner and cancel authentication. Defaults to true.
BannerText | Gets the text of the banner sent by the server.

Remarks

See the ComponentBase.SynchronizingObject property for important information on updating UI controls from within this event.

Example

The following demonstrates displaying the banner to the user and requesting permission to proceed with authentication.
C# Copy Code
private void ssh1_Banner(object sender, BannerEventArgs e)
{
    string prompt = string.Concat(e.BannerText.Trim(), Environment.NewLine, Environment.NewLine, "Continue with authentication?");
    if (MessageBox.Show(prompt, "Server presented a banner", MessageBoxButtons.YesNo) == DialogResult.No)
    {
        //Set to false to cancel Authentication
        e.Accept = false;
    }
}
Visual Basic Copy Code
Private Sub ssh1_Banner(ByVal sender As Object, ByVal e As BannerEventArgs) Handles ssh1.Banner
    Dim prompt As String = String.Concat(e.BannerText.Trim(), Environment.NewLine, Environment.NewLine, "Continue with authentication?")
    If MessageBox.Show(prompt, "Server presented a banner", MessageBoxButtons.YesNo) = System.Windows.Forms.DialogResult.No Then
        'Set to false to cancel Authentication
        e.Accept = False
    End If
End Sub

See Also

Reference

SshConnection Class
SshConnection Members


Challenge Event

[image]
PowerTCP SSH and SFTP for .NET
Challenge Event
See Also Example Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : Challenge Event

Glossary Item Box

Raised when the server presents its challenges during 'keyboard-interactive' authentication.

Syntax

Visual Basic (Declaration)
Public Event Challenge As SshConnection.ChallengeEventHandler
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim handler As SshConnection.ChallengeEventHandler

AddHandler instance.Challenge, handler
C#
public event SshConnection.ChallengeEventHandler Challenge
Managed Extensions for C++
public: __event SshConnection.ChallengeEventHandler* Challenge
C++/CLI
public:
event SshConnection.ChallengeEventHandler^ Challenge

Event Data

The event handler receives an argument of type ChallengeEventArgs containing data related to this event. The following ChallengeEventArgs properties provide information specific to this event.

Property | Description
Echo | Gets information sent by the server that indicates whether responses will be echoed back to the client.
Instruction | Gets the instruction string sent by the server.
Name | Gets the name string sent by the server.
Prompt | Gets the prompt or prompts sent by the server.
Response | Gets a string array that the user should initialize to values that will be sent to the server for authentication. Each Response correlates to a Prompt at the same index.

Remarks

For each ChallengeEventArgs.Prompt, populate a ChallengeEventArgs.Response at the same index to proceed with authentication.

See the ComponentBase.SynchronizingObject property for important information on updating UI controls from within this event.

Example

The example below demonstrates 'keyboard-interactive' authentication with the Challenge event.
C# Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
    //Connect to the server
    ssh1.Connection.RemoteEndPoint.HostNameOrAddress = myServerHostname;
    ssh1.Connection.RemoteEndPoint.Port = myServerPort; //Usually 22
    ssh1.Connect();

    ssh1.Authenticate(myUsername, new string[] { });
}

private void ssh1_Challenge(object sender, ChallengeEventArgs e)
{
    for (int i = 0; i <= e.Prompt.Length - 1; i++)
    {
        if (e.Prompt[i] == "password:")
            e.Response[i] = myPassword;
        //If the server presents additional challenges, populate each response here
    }
}
Visual Basic Copy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
    'Connect to the server
    ssh1.Connection.RemoteEndPoint.HostNameOrAddress = myServerHostname
    ssh1.Connection.RemoteEndPoint.Port = myServerPort 'Usually 22
    ssh1.Connect()

    ssh1.Authenticate(myUsername, New String() { })
End Sub

Private Sub ssh1_Challenge(ByVal sender As Object, ByVal e As ChallengeEventArgs) Handles ssh1.Challenge
    For i As Integer = 0 To e.Prompt.Length - 1
        If e.Prompt(i) = "password:" Then
            e.Response(i) = myPassword
        End If
        'If the server presents additional challenges, populate each response here
    Next i
End Sub

See Also

Reference

SshConnection Class
SshConnection Members


HostKey Event

[image]
PowerTCP SSH and SFTP for .NET
HostKey Event
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : HostKey Event

Glossary Item Box

Raised when the server presents its hostkey while establishing a connection.

Syntax

Visual Basic (Declaration)
Public Event HostKey As SshConnection.HostKeyEventHandler
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim handler As SshConnection.HostKeyEventHandler

AddHandler instance.HostKey, handler
C#
public event SshConnection.HostKeyEventHandler HostKey
Managed Extensions for C++
public: __event SshConnection.HostKeyEventHandler* HostKey
C++/CLI
public:
event SshConnection.HostKeyEventHandler^ HostKey

Event Data

The event handler receives an argument of type HostKeyEventArgs containing data related to this event. The following HostKeyEventArgs properties provide information specific to this event.

Property | Description
HostKey | Gets the host key being used by the SSH server.
HostKeyAlgorithm | Gets the host key algorithm being used.
Verified | Gets and sets a value that indicates the application has verified the host key.

Remarks

Provides an opportunity for the client to verify the server, for example, using Domain Name System Security (DNSSEC) (see RFC 4255).

The HostKeyEventArgs.Verified property must be set to true to continue.

See the ComponentBase.SynchronizingObject property for important information on updating UI controls from within this event.

See Also

Reference

SshConnection Class
SshConnection Members


Log Event

[image]
PowerTCP SSH and SFTP for .NET
Log Event
See Also Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : Log Event

Glossary Item Box

Used to log packet-level communications.

Syntax

Visual Basic (Declaration)
Public Event Log As LogEventHandler
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim handler As LogEventHandler

AddHandler instance.Log, handler
C#
public event LogEventHandler Log
Managed Extensions for C++
public: __event LogEventHandler* Log
C++/CLI
public:
event LogEventHandler^ Log

Event Data

The event handler receives an argument of type LogEventArgs containing data related to this event. The following LogEventArgs properties provide information specific to this event.

Property | Description
Direction | Indicates whether the packet was sent or received.
Packet | Returns a Packet that interprets an SSH packet.

Remarks

Data is reported when received, and may not correlate directly to methods that process this data.

See Also

Reference

SshConnection Class
SshConnection Members


StateChanged Event

[image]
PowerTCP SSH and SFTP for .NET
StateChanged Event
See Also Example Send comments on this topic
Dart.Ssh Namespace > SshConnection Class : StateChanged Event

Glossary Item Box

Raised when the value of the State property changes, or a call to any Authenticate method returns.

Syntax

Visual Basic (Declaration)
Public Event StateChanged As EventHandler
Visual Basic (Usage) Copy Code
Dim instance As SshConnection
Dim handler As EventHandler

AddHandler instance.StateChanged, handler
C#
public event EventHandler StateChanged
Managed Extensions for C++
public: __event EventHandler* StateChanged
C++/CLI
public:
event EventHandler^ StateChanged

Remarks

Connection.GetRemainingAuthMethods can raise this event if its return value is not cached from a previous authentication attempt.

This method is raised on the UI thread if the SynchronizingObject is set. Otherwise this event is raised on a worker thread.

Example

This example demonstrates using the StateChanged event and State property to update the UI.
C# Copy Code
private void ssh1_StateChanged(object sender, BaseEventArgs e)
{
    if (ssh1.State == ConnectionState.Closed)
        this.Text = "Not Connected";
    else if (ssh1.State == ConnectionState.Connected)
        this.Text = "Connected to " + ssh1.Connection.RemoteEndPoint.ToString();
    else if (ssh1.State == ConnectionState.ConnectedAndPartiallyAuthenticated)
        this.Text = "Partially Authenticated...";
    else
        this.Text = "Securely connected to " + ssh1.Connection.RemoteEndPoint.ToString();
}
Visual Basic Copy Code
Private Sub ssh1_StateChanged(ByVal sender As Object, ByVal e As BaseEventArgs) Handles ssh1.StateChanged
    If ssh1.State = ConnectionState.Closed Then
        Me.Text = "Not Connected"
    ElseIf ssh1.State = ConnectionState.Connected Then
        Me.Text = "Connected to " & ssh1.Connection.RemoteEndPoint.ToString()
    ElseIf ssh1.State = ConnectionState.ConnectedAndPartiallyAuthenticated Then
        Me.Text = "Partially Authenticated..."
    Else
        Me.Text = "Securely connected to " & ssh1.Connection.RemoteEndPoint.ToString()
    End If
End Sub

See Also

Reference

SshConnection Class
SshConnection Members


SshDataEventArgs Class

[image]
PowerTCP SSH and SFTP for .NET
SshDataEventArgs Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : SshDataEventArgs Class

Glossary Item Box

Provides data for the Data event.

Object Model

SshDataEventArgs ClassData ClassSessionStream Class

Syntax

Visual Basic (Declaration)
Public Class SshDataEventArgs
   Inherits DataEventArgs
Visual Basic (Usage) Copy Code
Dim instance As SshDataEventArgs
C#
public class SshDataEventArgs : DataEventArgs
Managed Extensions for C++
public __gc class SshDataEventArgs : public DataEventArgs
C++/CLI
public ref class SshDataEventArgs : public DataEventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
Dart.Ssh.UserStateEventArgs
Dart.Ssh.DataEventArgs
Dart.Ssh.SshDataEventArgs

See Also

Reference

SshDataEventArgs Members
Dart.Ssh Namespace


SshDataEventArgs Class Members

[image]
PowerTCP SSH and SFTP for .NET
SshDataEventArgs Class Members
See Also Properties Methods Send comments on this topic
Dart.Ssh Namespace : SshDataEventArgs Class

Glossary Item Box

The following tables list the members exposed by SshDataEventArgs.

Public Constructors

 | Name | Description
Public Constructor | SshDataEventArgs Constructor | Initializes a new instance of the SshDataEventArgs class.
Top

Public Properties

 | Name | Description
Public Property | Data | Gets data provided by Data and Log events. (Inherited from Dart.Ssh.DataEventArgs)
Public Property | Message | Returns the message argument provided by the Marshal method. (Inherited from Dart.Ssh.UserStateEventArgs)
Public Property | Session | Gets the SessionStream the data was read from.
Public Property | UserState | Returns the user state argument provided by the Marshal method. (Inherited from Dart.Ssh.UserStateEventArgs)
Top

Public Methods

 | Name | Description
Public Method | ToString | Gets the Data property as a decoded string. (Inherited from Dart.Ssh.DataEventArgs)
Top

See Also

Reference

SshDataEventArgs Class
Dart.Ssh Namespace


SshDataEventArgs Constructor

[image]
PowerTCP SSH and SFTP for .NET
SshDataEventArgs Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > SshDataEventArgs Class : SshDataEventArgs Constructor

data
session
message
state

Glossary Item Box

Initializes a new instance of the SshDataEventArgs class.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal data As Data, _
   ByVal session As SessionStream, _
   ByVal message As String, _
   ByVal state As Object _
)
Visual Basic (Usage) Copy Code
Dim data As Data
Dim session As SessionStream
Dim message As String
Dim state As Object

Dim instance As New SshDataEventArgs(data, session, message, state)
C#
public SshDataEventArgs(
   Data data,
   SessionStream session,
   string message,
   object state
)
Managed Extensions for C++
public: SshDataEventArgs(
   Data* data,
   SessionStream* session,
   string* message,
   Object* state
)
C++/CLI
public:
SshDataEventArgs(
   Data^ data,
   SessionStream^ session,
   String^ message,
   Object^ state
)

Parameters

data
session
message
state

See Also

Reference

SshDataEventArgs Class
SshDataEventArgs Members


SshDataEventArgs Class Properties

[image]
PowerTCP SSH and SFTP for .NET
SshDataEventArgs Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : SshDataEventArgs Class

Glossary Item Box

For a list of all members of this type, see SshDataEventArgs members.

Public Properties

 | Name | Description
Public Property | Data | Gets data provided by Data and Log events. (Inherited from Dart.Ssh.DataEventArgs)
Public Property | Message | Returns the message argument provided by the Marshal method. (Inherited from Dart.Ssh.UserStateEventArgs)
Public Property | Session | Gets the SessionStream the data was read from.
Public Property | UserState | Returns the user state argument provided by the Marshal method. (Inherited from Dart.Ssh.UserStateEventArgs)
Top

See Also

Reference

SshDataEventArgs Class
Dart.Ssh Namespace


Session Property

[image]
PowerTCP SSH and SFTP for .NET
Session Property
See Also Send comments on this topic
Dart.Ssh Namespace > SshDataEventArgs Class : Session Property

Glossary Item Box

Gets the SessionStream the data was read from.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Session As SessionStream
Visual Basic (Usage) Copy Code
Dim instance As SshDataEventArgs
Dim value As SessionStream

value = instance.Session
C#
public SessionStream Session {get;}
Managed Extensions for C++
public: __property SessionStream* get_Session();
C++/CLI
public:
property SessionStream^ Session {
   SessionStream^ get();
}

See Also

Reference

SshDataEventArgs Class
SshDataEventArgs Members


SshLoginData Class

[image]
PowerTCP SSH and SFTP for .NET
SshLoginData Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : SshLoginData Class

Glossary Item Box

Used to hold SSH login information.

Object Model

SshLoginData Class

Syntax

Visual Basic (Declaration)
<SerializableAttribute()>
Public Class SshLoginData
   Inherits LoginData
Visual Basic (Usage) Copy Code
Dim instance As SshLoginData
C#
[Serializable()]
public class SshLoginData : LoginData
Managed Extensions for C++
[Serializable()]
public __gc class SshLoginData : public LoginData
C++/CLI
[Serializable()]
public ref class SshLoginData : public LoginData

Inheritance Hierarchy

System.Object
Dart.Ssh.LoginData
Dart.Ssh.SshLoginData

See Also

Reference

SshLoginData Members
Dart.Ssh Namespace


SshLoginData Class Members

[image]
PowerTCP SSH and SFTP for .NET
SshLoginData Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : SshLoginData Class

Glossary Item Box

The following tables list the members exposed by SshLoginData.

Public Constructors

 | Name | Description
Public Constructor | SshLoginData Constructor | Overloaded.
Top

Public Properties

 | Name | Description
Public Property | HostNameOrAddress | The hostname or address in dot notation. (Inherited from Dart.Ssh.LoginData)
Public Property | Passphrase | Passphrase for the PEM private key. Can be null or empty.
Public Property | Password | The password for basic authentication. (Inherited from Dart.Ssh.LoginData)
Public Property | Pem | PEM-encoded DSA/RSA private key in OpenSSH key format. Can be null or empty.
Public Property | Port | The port. (Inherited from Dart.Ssh.LoginData)
Public Property | Submethods | An array of preferred authentication submethods to suggest to the server. May be 0-length or null.
Public Property | Username | The username for basic authentication (null if no authentication is needed). (Inherited from Dart.Ssh.LoginData)
Top

See Also

Reference

SshLoginData Class
Dart.Ssh Namespace


SshLoginData Constructor

[image]
PowerTCP SSH and SFTP for .NET
SshLoginData Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > SshLoginData Class : SshLoginData Constructor

Glossary Item Box

Overload List

Overload | Description
SshLoginData Constructor() | Used to hold SSH login information.
SshLoginData Constructor(String,Int32,String,String,String,String,String[]) | Used to initialize class members.

See Also

Reference

SshLoginData Class
SshLoginData Members


SshLoginData Constructor()

[image]
PowerTCP SSH and SFTP for .NET
SshLoginData Constructor()
See Also Send comments on this topic
Dart.Ssh Namespace > SshLoginData Class > SshLoginData Constructor : SshLoginData Constructor()

Glossary Item Box

Used to hold SSH login information.

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As New SshLoginData()
C#
public SshLoginData()
Managed Extensions for C++
public: SshLoginData();
C++/CLI
public:
SshLoginData();

See Also

Reference

SshLoginData Class
SshLoginData Members
Overload List


SshLoginData Constructor(String,Int32,String,String,String,String,String[])

[image]
PowerTCP SSH and SFTP for .NET
SshLoginData Constructor(String,Int32,String,String,String,String,String[])
See Also Send comments on this topic
Dart.Ssh Namespace > SshLoginData Class > SshLoginData Constructor : SshLoginData Constructor(String,Int32,String,String,String,String,String[])

hostNameOrAddress
Host (server) name or address in string form.
port
Host port to use. 22 is the port used by most SSH servers.
username
Username for authentication.
password
Password for authentication.
pem
PEM-encoded DSA/RSA private key in OpenSSH key format. Can be null or empty.
passphrase
Passphrase for the private key. Can be null or empty.
submethods
An array of preferred authentication submethods to suggest to the server. May be 0-length or null.

Glossary Item Box

Used to initialize class members.

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal hostNameOrAddress As String, _
   ByVal port As Integer, _
   ByVal username As String, _
   ByVal password As String, _
   ByVal pem As String, _
   ByVal passphrase As String, _
   ByVal submethods() As String _
)
Visual Basic (Usage) Copy Code
Dim hostNameOrAddress As String
Dim port As Integer
Dim username As String
Dim password As String
Dim pem As String
Dim passphrase As String
Dim submethods() As String

Dim instance As New SshLoginData(hostNameOrAddress, port, username, password, pem, passphrase, submethods)
C#
public SshLoginData(
   string hostNameOrAddress,
   int port,
   string username,
   string password,
   string pem,
   string passphrase,
   string[] submethods
)
Managed Extensions for C++
public: SshLoginData(
   string* hostNameOrAddress,
   int port,
   string* username,
   string* password,
   string* pem,
   string* passphrase,
   string*[]* submethods
)
C++/CLI
public:
SshLoginData(
   String^ hostNameOrAddress,
   int port,
   String^ username,
   String^ password,
   String^ pem,
   String^ passphrase,
   array<String^>^ submethods
)

Parameters

hostNameOrAddress
Host (server) name or address in string form.
port
Host port to use. 22 is the port used by most SSH servers.
username
Username for authentication.
password
Password for authentication.
pem
PEM-encoded DSA/RSA private key in OpenSSH key format. Can be null or empty.
passphrase
Passphrase for the private key. Can be null or empty.
submethods
An array of preferred authentication submethods to suggest to the server. May be 0-length or null.

See Also

Reference

SshLoginData Class
SshLoginData Members
Overload List


SshLoginData Class Properties

[image]
PowerTCP SSH and SFTP for .NET
SshLoginData Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : SshLoginData Class

Glossary Item Box

For a list of all members of this type, see SshLoginData members.

Public Properties

 | Name | Description
Public Property | HostNameOrAddress | The hostname or address in dot notation. (Inherited from Dart.Ssh.LoginData)
Public Property | Passphrase | Passphrase for the PEM private key. Can be null or empty.
Public Property | Password | The password for basic authentication. (Inherited from Dart.Ssh.LoginData)
Public Property | Pem | PEM-encoded DSA/RSA private key in OpenSSH key format. Can be null or empty.
Public Property | Port | The port. (Inherited from Dart.Ssh.LoginData)
Public Property | Submethods | An array of preferred authentication submethods to suggest to the server. May be 0-length or null.
Public Property | Username | The username for basic authentication (null if no authentication is needed). (Inherited from Dart.Ssh.LoginData)
Top

See Also

Reference

SshLoginData Class
Dart.Ssh Namespace


Passphrase Property

[image]
PowerTCP SSH and SFTP for .NET
Passphrase Property
See Also Send comments on this topic
Dart.Ssh Namespace > SshLoginData Class : Passphrase Property

Glossary Item Box

Passphrase for the PEM private key. Can be null or empty.

Syntax

Visual Basic (Declaration)
Public Property Passphrase As String
Visual Basic (Usage) Copy Code
Dim instance As SshLoginData
Dim value As String

instance.Passphrase = value

value = instance.Passphrase
C#
public string Passphrase {get; set;}
Managed Extensions for C++
public: __property string* get_Passphrase();
public: __property void set_Passphrase(
   string* value
);
C++/CLI
public:
property String^ Passphrase {
   String^ get();
   void set (    String^ value);
}

Remarks

If the provided PEM private key string is encrypted ("Proc-Type: 4,ENCRYPTED") a 'passphrase' must be provided.

See Also

Reference

SshLoginData Class
SshLoginData Members


Pem Property

[image]
PowerTCP SSH and SFTP for .NET
Pem Property
See Also Send comments on this topic
Dart.Ssh Namespace > SshLoginData Class : Pem Property

Glossary Item Box

PEM-encoded DSA/RSA private key in OpenSSH key format. Can be null or empty.

Syntax

Visual Basic (Declaration)
Public Property Pem As String
Visual Basic (Usage) Copy Code
Dim instance As SshLoginData
Dim value As String

instance.Pem = value

value = instance.Pem
C#
public string Pem {get; set;}
Managed Extensions for C++
public: __property string* get_Pem();
public: __property void set_Pem(
   string* value
);
C++/CLI
public:
property String^ Pem {
   String^ get();
   void set (    String^ value);
}

Remarks

Public key authentication method works by signing a challenge sent by the server. The signature is either DSA or RSA based, depending upon on the type of private key you specify; a DSA or RSA private key in PEM format (must contain a "-----BEGIN DSA PRIVATE KEY-----" or "-----BEGIN RSA PRIVATE KEY-----" tag). The method is called 'publickey' in the SSH-2 protocol specification, however it actually requires a private key to be provided (the server will use the public key counterpart to verify the signature).

The private key string may also be encrypted ("Proc-Type: 4,ENCRYPTED"). The library supports DES-CBC and DES-EDE3-CBC encryption, as well as the more exotic PEM encryptions AES-128-CBC, AES-192-CBC and AES-256-CBC.

NOTE PUTTY USERS: Even though your key file may start with "-----BEGIN..." it is not in the expected format. You must convert it to the OpenSSH key format with the "puttygen" tool (can be downloaded from the Putty website). Load your key and use the "Conversions/Export OpenSSH key" functionality to produce a compatible PEM file.

See Also

Reference

SshLoginData Class
SshLoginData Members


Submethods Property

[image]
PowerTCP SSH and SFTP for .NET
Submethods Property
See Also Send comments on this topic
Dart.Ssh Namespace > SshLoginData Class : Submethods Property

Glossary Item Box

An array of preferred authentication submethods to suggest to the server. May be 0-length or null.

Syntax

Visual Basic (Declaration)
Public Property Submethods As String()
Visual Basic (Usage) Copy Code
Dim instance As SshLoginData
Dim value() As String

instance.Submethods = value

value = instance.Submethods
C#
public string[] Submethods {get; set;}
Managed Extensions for C++
public: __property string*[]* get_Submethods();
public: __property void set_Submethods(
   string*[]* value
);
C++/CLI
public:
property array<String^>^ Submethods {
   array<String^>^ get();
   void set (    array<String^>^ value);
}

See Also

Reference

SshLoginData Class
SshLoginData Members


UserStateEventArgs Class

[image]
PowerTCP SSH and SFTP for .NET
UserStateEventArgs Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : UserStateEventArgs Class

Glossary Item Box

Provides data for ComponentBase.UserState. Base class for EventArgs that have Message and UserState properties.

Object Model

UserStateEventArgs Class

Syntax

Visual Basic (Declaration)
Public Class UserStateEventArgs
   Inherits System.EventArgs
Visual Basic (Usage) Copy Code
Dim instance As UserStateEventArgs
C#
public class UserStateEventArgs : System.EventArgs
Managed Extensions for C++
public __gc class UserStateEventArgs : public System.EventArgs
C++/CLI
public ref class UserStateEventArgs : public System.EventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
Dart.Ssh.UserStateEventArgs
Dart.Ssh.DataEventArgs

See Also

Reference

UserStateEventArgs Members
Dart.Ssh Namespace


UserStateEventArgs Class Members

[image]
PowerTCP SSH and SFTP for .NET
UserStateEventArgs Class Members
See Also Properties Send comments on this topic
Dart.Ssh Namespace : UserStateEventArgs Class

Glossary Item Box

The following tables list the members exposed by UserStateEventArgs.

Public Properties

 | Name | Description
Public Property | Message | Returns the message argument provided by the Marshal method.
Public Property | UserState | Returns the user state argument provided by the Marshal method.
Top

See Also

Reference

UserStateEventArgs Class
Dart.Ssh Namespace


UserStateEventArgs Class Properties

[image]
PowerTCP SSH and SFTP for .NET
UserStateEventArgs Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : UserStateEventArgs Class

Glossary Item Box

For a list of all members of this type, see UserStateEventArgs members.

Public Properties

 | Name | Description
Public Property | Message | Returns the message argument provided by the Marshal method.
Public Property | UserState | Returns the user state argument provided by the Marshal method.
Top

See Also

Reference

UserStateEventArgs Class
Dart.Ssh Namespace


Message Property

[image]
PowerTCP SSH and SFTP for .NET
Message Property
See Also Send comments on this topic
Dart.Ssh Namespace > UserStateEventArgs Class : Message Property

Glossary Item Box

Returns the message argument provided by the Marshal method.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Message As String
Visual Basic (Usage) Copy Code
Dim instance As UserStateEventArgs
Dim value As String

value = instance.Message
C#
public string Message {get;}
Managed Extensions for C++
public: __property string* get_Message();
C++/CLI
public:
property String^ Message {
   String^ get();
}

See Also

Reference

UserStateEventArgs Class
UserStateEventArgs Members


UserState Property

[image]
PowerTCP SSH and SFTP for .NET
UserState Property
See Also Send comments on this topic
Dart.Ssh Namespace > UserStateEventArgs Class : UserState Property

Glossary Item Box

Returns the user state argument provided by the Marshal method.

Syntax

Visual Basic (Declaration)
Public ReadOnly Property UserState As Object
Visual Basic (Usage) Copy Code
Dim instance As UserStateEventArgs
Dim value As Object

value = instance.UserState
C#
public object UserState {get;}
Managed Extensions for C++
public: __property Object* get_UserState();
C++/CLI
public:
property Object^ UserState {
   Object^ get();
}

See Also

Reference

UserStateEventArgs Class
UserStateEventArgs Members


ZStream Class

[image]
PowerTCP SSH and SFTP for .NET
ZStream Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : ZStream Class

Glossary Item Box

Used as the abstract base class for CompressingStream and InflatingStream.

Object Model

ZStream Class

Syntax

Visual Basic (Declaration)
Public MustInherit Class ZStream
   Inherits BaseStream
Visual Basic (Usage) Copy Code
Dim instance As ZStream
C#
public abstract class ZStream : BaseStream
Managed Extensions for C++
public __gc abstract class ZStream : public BaseStream
C++/CLI
public ref class ZStream abstract : public BaseStream

Remarks

Compression software is provided by the generosity of ComponentAce:

Copyright (c) 2006-2007, ComponentAce
http://www.componentace.com

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of ComponentAce nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.IO.Stream
Dart.Ssh.BaseStream
Dart.Ssh.ZStream

See Also

Reference

ZStream Members
Dart.Ssh Namespace


ZStream Class Members

[image]
PowerTCP SSH and SFTP for .NET
ZStream Class Members
See Also Properties Methods Send comments on this topic
Dart.Ssh Namespace : ZStream Class

Glossary Item Box

The following tables list the members exposed by ZStream.

Public Properties

 | Name | Description
Public Property | CanRead | (Inherited from Dart.Ssh.BaseStream)
Public Property | CanSeek | (Inherited from Dart.Ssh.BaseStream)
Public Property | CanTimeout | Gets a value that determines whether the current stream can time out. (Inherited from System.IO.Stream)
Public Property | CanWrite | (Inherited from Dart.Ssh.BaseStream)
Public Property | Length | (Inherited from Dart.Ssh.BaseStream)
Public Property | Position | (Inherited from Dart.Ssh.BaseStream)
Public Property | ReadTimeout | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out. (Inherited from System.IO.Stream)
Public Property | WriteTimeout | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out. (Inherited from System.IO.Stream)
Top

Public Methods

 | Name | Description
Public Method | BeginRead | Begins an asynchronous read operation. (Consider using System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | BeginWrite | Begins an asynchronous write operation. (Consider using System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | Close | Overridden.
Public Method | CopyTo | Overloaded. Reads the bytes from the current stream and writes them to another stream. (Inherited from System.IO.Stream)
Public Method | CopyToAsync | Overloaded. Asynchronously reads the bytes from the current stream and writes them to another stream. (Inherited from System.IO.Stream)
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Dispose | Overloaded. Releases all resources used by the System.IO.Stream. (Inherited from System.IO.Stream)
Public Method | EndRead | Waits for the pending asynchronous read to complete. (Consider using System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | EndWrite | Ends an asynchronous write operation. (Consider using System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | Flush | Overridden.
Public Method | FlushAsync | Overloaded. Asynchronously clears all buffers for this stream and causes any buffered data to be written to the underlying device. (Inherited from System.IO.Stream)
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Read | When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (Inherited from System.IO.Stream)
Public Method | ReadAsync | Overloaded. Asynchronously reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (Inherited from System.IO.Stream)
Public Method | ReadByte | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. (Inherited from System.IO.Stream)
Public Method | Seek | (Inherited from Dart.Ssh.BaseStream)
Public Method | SetLength | (Inherited from Dart.Ssh.BaseStream)
Public Method | Write | When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (Inherited from System.IO.Stream)
Public Method | WriteAsync | Overloaded. Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (Inherited from System.IO.Stream)
Public Method | WriteByte | Writes a byte to the current position in the stream and advances the position within the stream by one byte. (Inherited from System.IO.Stream)
Top

Protected Methods

 | Name | Description
Protected Method | CreateWaitHandle | Allocates a System.Threading.WaitHandle object. (Inherited from System.IO.Stream)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | ObjectInvariant | Provides support for a System.Diagnostics.Contracts.Contract. (Inherited from System.IO.Stream)
Top

See Also

Reference

ZStream Class
Dart.Ssh Namespace


ZStream Class Methods

[image]
PowerTCP SSH and SFTP for .NET
ZStream Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : ZStream Class

Glossary Item Box

For a list of all members of this type, see ZStream members.

Public Methods

 | Name | Description
Public Method | BeginRead | Begins an asynchronous read operation. (Consider using System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | BeginWrite | Begins an asynchronous write operation. (Consider using System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | Close | Overridden.
Public Method | CopyTo | Overloaded. Reads the bytes from the current stream and writes them to another stream. (Inherited from System.IO.Stream)
Public Method | CopyToAsync | Overloaded. Asynchronously reads the bytes from the current stream and writes them to another stream. (Inherited from System.IO.Stream)
Public Method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public Method | Dispose | Overloaded. Releases all resources used by the System.IO.Stream. (Inherited from System.IO.Stream)
Public Method | EndRead | Waits for the pending asynchronous read to complete. (Consider using System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | EndWrite | Ends an asynchronous write operation. (Consider using System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) (Inherited from System.IO.Stream)
Public Method | Flush | Overridden.
Public Method | FlushAsync | Overloaded. Asynchronously clears all buffers for this stream and causes any buffered data to be written to the underlying device. (Inherited from System.IO.Stream)
Public Method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public Method | Read | When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (Inherited from System.IO.Stream)
Public Method | ReadAsync | Overloaded. Asynchronously reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (Inherited from System.IO.Stream)
Public Method | ReadByte | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. (Inherited from System.IO.Stream)
Public Method | Seek | (Inherited from Dart.Ssh.BaseStream)
Public Method | SetLength | (Inherited from Dart.Ssh.BaseStream)
Public Method | Write | When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (Inherited from System.IO.Stream)
Public Method | WriteAsync | Overloaded. Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (Inherited from System.IO.Stream)
Public Method | WriteByte | Writes a byte to the current position in the stream and advances the position within the stream by one byte. (Inherited from System.IO.Stream)
Top

Protected Methods

 | Name | Description
Protected Method | CreateWaitHandle | Allocates a System.Threading.WaitHandle object. (Inherited from System.IO.Stream)
Protected Method | MemberwiseClone | Overloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected Method | ObjectInvariant | Provides support for a System.Diagnostics.Contracts.Contract. (Inherited from System.IO.Stream)
Top

See Also

Reference

ZStream Class
Dart.Ssh Namespace


Close Method

[image]
PowerTCP SSH and SFTP for .NET
Close Method
See Also Send comments on this topic
Dart.Ssh Namespace > ZStream Class : Close Method

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Overrides Sub Close()
Visual Basic (Usage) Copy Code
Dim instance As ZStream

instance.Close()
C#
public override void Close()
Managed Extensions for C++
public: void Close(); override
C++/CLI
public:
void Close(); override

See Also

Reference

ZStream Class
ZStream Members


Flush Method

[image]
PowerTCP SSH and SFTP for .NET
Flush Method
See Also Send comments on this topic
Dart.Ssh Namespace > ZStream Class : Flush Method

Glossary Item Box

Syntax

Visual Basic (Declaration)
Public Overrides Sub Flush()
Visual Basic (Usage) Copy Code
Dim instance As ZStream

instance.Flush()
C#
public override void Flush()
Managed Extensions for C++
public: void Flush(); override
C++/CLI
public:
void Flush(); override

See Also

Reference

ZStream Class
ZStream Members


ZStreamException Class

[image]
PowerTCP SSH and SFTP for .NET
ZStreamException Class
Members See Also Send comments on this topic
Dart.Ssh Namespace : ZStreamException Class

Glossary Item Box

Indicates a failure in ZLIB compression processing.

Object Model

ZStreamException Class

Syntax

Visual Basic (Declaration)
Public Class ZStreamException
   Inherits System.IO.IOException
Visual Basic (Usage) Copy Code
Dim instance As ZStreamException
C#
public class ZStreamException : System.IO.IOException
Managed Extensions for C++
public __gc class ZStreamException : public System.IO.IOException
C++/CLI
public ref class ZStreamException : public System.IO.IOException

Inheritance Hierarchy

System.Object
System.Exception
System.SystemException
System.IO.IOException
Dart.Ssh.ZStreamException

See Also

Reference

ZStreamException Members
Dart.Ssh Namespace


ZStreamException Class Members

[image]
PowerTCP SSH and SFTP for .NET
ZStreamException Class Members
See Also Properties Methods Events Send comments on this topic
Dart.Ssh Namespace : ZStreamException Class

Glossary Item Box

The following tables list the members exposed by ZStreamException.

Public Properties

 | Name | Description
Public Property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from System.Exception)
Public Property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from System.Exception)
Public Property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from System.Exception)
Public Property | InnerException | Gets the System.Exception instance that caused the current exception. (Inherited from System.Exception)
Public Property | Message | Gets a message that describes the current exception. (Inherited from System.Exception)
Public Property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from System.Exception)
Public Property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from System.Exception)
Public Property | TargetSite | Gets the method that throws the current exception. (Inherited from System.Exception)
Top

Public Methods

 | Name | Description
Public Method | GetBaseException | When overridden in a derived class, returns the System.Exception that is the root cause of one or more subsequent exceptions. (Inherited from System.Exception)
Public Method | GetObjectData | When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception. (Inherited from System.Exception)
Public Method | GetType | Gets the runtime type of the current instance. (Inherited from System.Exception)
Public Method | ToString | Creates and returns a string representation of the current exception. (Inherited from System.Exception)
Top

Protected Events

 | Name | Description
Protected Event | SerializeObjectState | Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Inherited from System.Exception)
Top

See Also

Reference

ZStreamException Class
Dart.Ssh Namespace


ConnectionState Enumeration

[image]
PowerTCP SSH and SFTP for .NET
ConnectionState Enumeration
See Also Send comments on this topic
Dart.Ssh Namespace : ConnectionState Enumeration

Glossary Item Box

Enumerates the possible values of the connection state.

Syntax

Visual Basic (Declaration)
Public Enum ConnectionState
   Inherits System.Enum
Visual Basic (Usage) Copy Code
Dim instance As ConnectionState
C#
public enum ConnectionState : System.Enum
Managed Extensions for C++
__value public enum ConnectionState : public System.Enum
C++/CLI
public enum class ConnectionState : public System.Enum

Members

Member | Description
Closed | The connection is closed.
Connected | The TCP connection is established but not secure.
ConnectedAndPartiallyAuthenticated | The connection is established but only partially authenticated - further authentication is required.
ConnectedAndSecure | The connection is connected and authenticated.

Inheritance Hierarchy

System.Object
System.ValueType
System.Enum
Dart.Ssh.ConnectionState

See Also

Reference

Dart.Ssh Namespace


CopyAction Enumeration

[image]
PowerTCP SSH and SFTP for .NET
CopyAction Enumeration
See Also Send comments on this topic
Dart.Ssh Namespace : CopyAction Enumeration

Glossary Item Box

Enumerates the copy action desired or completed.

Syntax

Visual Basic (Declaration)
Public Enum CopyAction
   Inherits System.Enum
Visual Basic (Usage) Copy Code
Dim instance As CopyAction
C#
public enum CopyAction : System.Enum
Managed Extensions for C++
__value public enum CopyAction : public System.Enum
C++/CLI
public enum class CopyAction : public System.Enum

Members

Member | Description
Get | A download from the server.
Put | An upload to the server.

Inheritance Hierarchy

System.Object
System.ValueType
System.Enum
Dart.Ssh.CopyAction

See Also

Reference

Dart.Ssh Namespace


CopyMode Enumeration

[image]
PowerTCP SSH and SFTP for .NET
CopyMode Enumeration
See Also Send comments on this topic
Dart.Ssh Namespace : CopyMode Enumeration

Glossary Item Box

Enumerates the type of copy desired or performed.

Syntax

Visual Basic (Declaration)
Public Enum CopyMode
   Inherits System.Enum
Visual Basic (Usage) Copy Code
Dim instance As CopyMode
C#
public enum CopyMode : System.Enum
Managed Extensions for C++
__value public enum CopyMode : public System.Enum
C++/CLI
public enum class CopyMode : public System.Enum

Members

Member | Description
Append | Appends the source file to the destination file. Upon completion of a copy operation, indicates the source file was appended to the destination file.
Copy | Uploads the entire file, overwriting any existing file. Upon completion of a copy operation, indicates the file was uploaded or overwritten.
Restart | Resumes an incomplete transfer or overwrites the destination file if the source file has been changed. Upon completion of a copy operation, indicates the transfer was resumed.
Synchronize | If the file timestamps and sizes match, no copy is performed. Otherwise a full copy is performed. Upon completion of a copy operation, indicates no copy was performed.

Remarks

CopyMode.Restart - If the file timestamps match and the source is larger than the destination, then the necessary trailing bytes from the source are appended to the destination. This mode should only be used to restart a failed copy. If the timestamps and sizes match, then no copy is performed (like CopyMode.Synchronize). If the timestamps do not match or the source is smaller than the destination, then a full copy is performed.

Inheritance Hierarchy

System.Object
System.ValueType
System.Enum
Dart.Ssh.CopyMode

See Also

Reference

Dart.Ssh Namespace


CopyStatus Enumeration

[image]
PowerTCP SSH and SFTP for .NET
CopyStatus Enumeration
See Also Send comments on this topic
Dart.Ssh Namespace : CopyStatus Enumeration

Glossary Item Box

Enumerates the status of a Copy action.

Syntax

Visual Basic (Declaration)
Public Enum CopyStatus
   Inherits System.Enum
Visual Basic (Usage) Copy Code
Dim instance As CopyStatus
C#
public enum CopyStatus : System.Enum
Managed Extensions for C++
__value public enum CopyStatus : public System.Enum
C++/CLI
public enum class CopyStatus : public System.Enum

Members

Member | Description
Aborted | The copy was aborted by the user.
Completed | The copy completed successfully.
Failed | The copy failed.
InProgress | The copy is is progress.

Inheritance Hierarchy

System.Object
System.ValueType
System.Enum
Dart.Ssh.CopyStatus

See Also

Reference

Dart.Ssh Namespace


DataDirection Enumeration

[image]
PowerTCP SSH and SFTP for .NET
DataDirection Enumeration
See Also Send comments on this topic
Dart.Ssh Namespace : DataDirection Enumeration

Glossary Item Box

Enumerates the direction of data flow.

Syntax

Visual Basic (Declaration)
Public Enum DataDirection
   Inherits System.Enum
Visual Basic (Usage) Copy Code
Dim instance As DataDirection
C#
public enum DataDirection : System.Enum
Managed Extensions for C++
__value public enum DataDirection : public System.Enum
C++/CLI
public enum class DataDirection : public System.Enum

Members

Member | Description
In | Data was received (using the Read method).
Out | Data was sent (using the Write method).

Inheritance Hierarchy

System.Object
System.ValueType
System.Enum
Dart.Ssh.DataDirection

See Also

Reference

Dart.Ssh Namespace


PacketMessage Enumeration

[image]
PowerTCP SSH and SFTP for .NET
PacketMessage Enumeration
See Also Send comments on this topic
Dart.Ssh Namespace : PacketMessage Enumeration

Glossary Item Box

Enumerates the messages used by SSH-2.

Syntax

Visual Basic (Declaration)
Public Enum PacketMessage
   Inherits System.Enum
Visual Basic (Usage) Copy Code
Dim instance As PacketMessage
C#
public enum PacketMessage : System.Enum
Managed Extensions for C++
__value public enum PacketMessage : public System.Enum
C++/CLI
public enum class PacketMessage : public System.Enum

Members

Member | Description
SSH_MSG_CHANNEL_CLOSE | SSH-2 transport message.
SSH_MSG_CHANNEL_DATA | SSH-2 transport message.
SSH_MSG_CHANNEL_EOF | SSH-2 transport message.
SSH_MSG_CHANNEL_EXTENDED_DATA | SSH-2 transport message.
SSH_MSG_CHANNEL_FAILURE | SSH-2 transport message.
SSH_MSG_CHANNEL_OPEN | SSH-2 transport message.
SSH_MSG_CHANNEL_OPEN_CONFIRMATION | SSH-2 transport message.
SSH_MSG_CHANNEL_OPEN_FAILURE | SSH-2 transport message.
SSH_MSG_CHANNEL_REQUEST | SSH-2 transport message.
SSH_MSG_CHANNEL_SUCCESS | SSH-2 transport message.
SSH_MSG_CHANNEL_WINDOW_ADJUST | SSH-2 transport message.
SSH_MSG_DEBUG | Debugging information.
SSH_MSG_DISCONNECT | A disconnect message.
SSH_MSG_GLOBAL_REQUEST | SSH-2 transport message.
SSH_MSG_IGNORE | Ignore this message.
SSH_MSG_KEX_DH_GEX_GROUP | SSH-2 transport message.
SSH_MSG_KEX_DH_GEX_INIT | SSH-2 transport message.
SSH_MSG_KEX_DH_GEX_REPLY | SSH-2 transport message.
SSH_MSG_KEX_DH_GEX_REQUEST | SSH-2 transport message.
SSH_MSG_KEX_DH_GEX_REQUEST_OLD | SSH-2 transport message.
SSH_MSG_KEXDH_INIT | Start Diffie-Hellman Key Exchange.
SSH_MSG_KEXDH_REPLY | Reply for Diffie-Hellman Key Exchange.
SSH_MSG_KEXINIT | Initialize key exchange.
SSH_MSG_NEWKEYS | Use of new keys and algorithms is starting now.
SSH_MSG_REQUEST_FAILURE | SSH-2 transport message.
SSH_MSG_REQUEST_SUCCESS | SSH-2 transport message.
SSH_MSG_SERVICE_ACCEPT | Named service request is accepted.
SSH_MSG_SERVICE_REQUEST | Requests a named service.
SSH_MSG_UNIMPLEMENTED | Response to an unrecognized message request.
SSH_MSG_USERAUTH_BANNER | SSH-2 transport message.
SSH_MSG_USERAUTH_FAILURE | SSH-2 transport message.
SSH_MSG_USERAUTH_INFO_REQUEST | SSH-2 transport message.
SSH_MSG_USERAUTH_INFO_RESPONSE | SSH-2 transport message.
SSH_MSG_USERAUTH_REQUEST | SSH-2 transport message.
SSH_MSG_USERAUTH_SUCCESS | SSH-2 transport message.

Inheritance Hierarchy

System.Object
System.ValueType
System.Enum
Dart.Ssh.PacketMessage

See Also

Reference

Dart.Ssh Namespace


PacketType Enumeration

[image]
PowerTCP SSH and SFTP for .NET
PacketType Enumeration
See Also Send comments on this topic
Dart.Ssh Namespace : PacketType Enumeration

Glossary Item Box

Type of SFTP packet

Syntax

Visual Basic (Declaration)
Public Enum PacketType
   Inherits System.Enum
Visual Basic (Usage) Copy Code
Dim instance As PacketType
C#
public enum PacketType : System.Enum
Managed Extensions for C++
__value public enum PacketType : public System.Enum
C++/CLI
public enum class PacketType : public System.Enum

Members

Member | Description
SSH_FXP_ATTRS | Response with file attributes.
SSH_FXP_CLOSE | Close a file.
SSH_FXP_DATA | Response with data from a read.
SSH_FXP_EXTENDED | Generic request for custom commands.
SSH_FXP_EXTENDED_REPLY | Generic response for custom commands.
SSH_FXP_FSETSTAT | Modify attributes of an open file.
SSH_FXP_FSTAT | Retrieve atributes and status of an open file.
SSH_FXP_HANDLE | File handle response.
SSH_FXP_INIT | Initiates SFTP session, sends version.
SSH_FXP_LSTAT | Retrieve attributes of a file.
SSH_FXP_MKDIR | Make a directory.
SSH_FXP_NAME | Response with one or more filenames.
SSH_FXP_OPEN | Open a file.
SSH_FXP_OPENDIR | Open a directory for reading.
SSH_FXP_READ | Read a file.
SSH_FXP_READDIR | List files and directories.
SSH_FXP_READLINK | Read the target of a symbolic link.
SSH_FXP_REALPATH | Canonicalize a path name to an absolute path.
SSH_FXP_REMOVE | Remove a file.
SSH_FXP_RENAME | Rename a file.
SSH_FXP_RMDIR | Remove a directory.
SSH_FXP_SETSTAT | Modify attributes of a file.
SSH_FXP_STAT | Retrieve attributes of a file; follows symbolic links.
SSH_FXP_STATUS | Status response message.
SSH_FXP_SYMLINK | Create a symbolic link.
SSH_FXP_VERSION | Version response to SSH_FXP_INIT.
SSH_FXP_WRITE | Write to a file.

Inheritance Hierarchy

System.Object
System.ValueType
System.Enum
Dart.Ssh.PacketType

See Also

Reference

Dart.Ssh Namespace


SftpMessage Enumeration

[image]
PowerTCP SSH and SFTP for .NET
SftpMessage Enumeration
See Also Send comments on this topic
Dart.Ssh Namespace : SftpMessage Enumeration

Glossary Item Box

Enumerates SFTP message types.

Syntax

Visual Basic (Declaration)
Public Enum SftpMessage
   Inherits System.Enum
Visual Basic (Usage) Copy Code
Dim instance As SftpMessage
C#
public enum SftpMessage : System.Enum
Managed Extensions for C++
__value public enum SftpMessage : public System.Enum
C++/CLI
public enum class SftpMessage : public System.Enum

Members

Member | Description
SSH_FXP_ATTRS | Response with file attributes.
SSH_FXP_CLOSE | Close a file.
SSH_FXP_DATA | Response with data from a read.
SSH_FXP_EXTENDED | Generic request for custom commands.
SSH_FXP_EXTENDED_REPLY | Generic response for custom commands.
SSH_FXP_FSETSTAT | Modify attributes of an open file.
SSH_FXP_FSTAT | Retrieve attributes and status of an open file.
SSH_FXP_HANDLE | File handle response.
SSH_FXP_INIT | Initiates SFTP session, sends version.
SSH_FXP_LSTAT | Retrieve attributes of a file.
SSH_FXP_MKDIR | Make a directory.
SSH_FXP_NAME | Response with one or more filenames.
SSH_FXP_OPEN | Open a file.
SSH_FXP_OPENDIR | Open a directory for reading.
SSH_FXP_READ | Read a file.
SSH_FXP_READDIR | List files and directories.
SSH_FXP_READLINK | Read the target of a symbolic link.
SSH_FXP_REALPATH | Canonicalize a path name to an absolute path.
SSH_FXP_REMOVE | Remove a file.
SSH_FXP_RENAME | Rename a file.
SSH_FXP_RMDIR | Remove a directory.
SSH_FXP_SETSTAT | Modify attributes of a file.
SSH_FXP_STAT | Retrieve attributes of a file; follows symbolic links.
SSH_FXP_STATUS | Status response message.
SSH_FXP_SYMLINK | Create a symbolic link.
SSH_FXP_VERSION | Version response to SSH_FXP_INIT.
SSH_FXP_WRITE | Write to a file.

Inheritance Hierarchy

System.Object
System.ValueType
System.Enum
Dart.Ssh.SftpMessage

See Also

Reference

Dart.Ssh Namespace


ThreadingModel Enumeration

[image]
PowerTCP SSH and SFTP for .NET
ThreadingModel Enumeration
See Also Send comments on this topic
Dart.Ssh Namespace : ThreadingModel Enumeration

Glossary Item Box

Specifies the available threading models.

Syntax

Visual Basic (Declaration)
Public Enum ThreadingModel
   Inherits System.Enum
Visual Basic (Usage) Copy Code
Dim instance As ThreadingModel
C#
public enum ThreadingModel : System.Enum
Managed Extensions for C++
__value public enum ThreadingModel : public System.Enum
C++/CLI
public enum class ThreadingModel : public System.Enum

Members

Member | Description
ApartmentAsync | Used for single-threaded apartment model environments when asynchronous non-blocking operation is desired.
ApartmentBlocking | Used for single-threaded apartment model environments when blocking operation is desired.
Free | Used for multithreaded environments.

Remarks

ThreadingModel.Free - Using this model, all methods execute on the calling thread. This is the recommended usage for development environments where the application can use Start() to execute code directly on a worker thread, services, or any environment that does not have a UI thread. This is the recommended choice for native .NET applications and C++ applications where the component's COM interface is used.

ThreadingModel.ApartmentBlocking - Using this model, selected methods will spawn an internal thread to process the desired action while blocking and servicing messages on the UI thread. This is the recommended usage for apartment model environments (like VB6) that are simple in nature. These selected methods include documentation referencing this enumeration and the event they will raise upon completion.

ThreadingModel.ApartmentAsync - Using this model, selected methods will spawn an internal thread to process the desired action and immediately returns. This is the recommended usage for advanced apartment model environments (like VB6) that support events. These selected methods include documentation referencing this enumeration and the event they will raise upon completion.

Inheritance Hierarchy

System.Object
System.ValueType
System.Enum
Dart.Ssh.ThreadingModel

See Also

Reference

Dart.Ssh Namespace


ServerHostKeyVerifier Interface

[image]
PowerTCP SSH and SFTP for .NET
ServerHostKeyVerifier Interface
Members See Also Send comments on this topic
Dart.Ssh Namespace : ServerHostKeyVerifier Interface

Glossary Item Box

A callback interface used to implement a client-specific method of checking server host keys.

Syntax

Visual Basic (Declaration)
Public Interface ServerHostKeyVerifier
Visual Basic (Usage) Copy Code
Dim instance As ServerHostKeyVerifier
C#
public interface ServerHostKeyVerifier
Managed Extensions for C++
public __gc __interface ServerHostKeyVerifier
C++/CLI
public interface class ServerHostKeyVerifier

See Also

Reference

ServerHostKeyVerifier Members
Dart.Ssh Namespace


ServerHostKeyVerifier Interface Members

[image]
PowerTCP SSH and SFTP for .NET
ServerHostKeyVerifier Interface Members
See Also Methods Send comments on this topic
Dart.Ssh Namespace : ServerHostKeyVerifier Interface

Glossary Item Box

The following tables list the members exposed by ServerHostKeyVerifier.

Public Methods

 | Name | Description
Method | VerifyServerHostKey | Verifies server host keys.
Top

See Also

Reference

ServerHostKeyVerifier Interface
Dart.Ssh Namespace


ServerHostKeyVerifier Interface Methods

[image]
PowerTCP SSH and SFTP for .NET
ServerHostKeyVerifier Interface Methods
See Also Send comments on this topic
Dart.Ssh Namespace : ServerHostKeyVerifier Interface

Glossary Item Box

For a list of all members of this type, see ServerHostKeyVerifier members.

Public Methods

 | Name | Description
Method | VerifyServerHostKey | Verifies server host keys.
Top

See Also

Reference

ServerHostKeyVerifier Interface
Dart.Ssh Namespace


VerifyServerHostKey Method

[image]
PowerTCP SSH and SFTP for .NET
VerifyServerHostKey Method
See Also Send comments on this topic
Dart.Ssh Namespace > ServerHostKeyVerifier Interface : VerifyServerHostKey Method

conn
The Connection object
serverHostKeyAlgorithm
The public key algorithm (ssh-rsa or ssh-dss)
serverHostKey
The server's public key blob

Glossary Item Box

Verifies server host keys.

Syntax

Visual Basic (Declaration)
Function VerifyServerHostKey( _
   ByVal conn As Connection, _
   ByVal serverHostKeyAlgorithm As String, _
   ByVal serverHostKey() As Byte _
) As Boolean
Visual Basic (Usage) Copy Code
Dim instance As ServerHostKeyVerifier
Dim conn As Connection
Dim serverHostKeyAlgorithm As String
Dim serverHostKey() As Byte
Dim value As Boolean

value = instance.VerifyServerHostKey(conn, serverHostKeyAlgorithm, serverHostKey)
C#
bool VerifyServerHostKey(
   Connection conn,
   string serverHostKeyAlgorithm,
   byte[] serverHostKey
)
Managed Extensions for C++
bool VerifyServerHostKey(
   Connection* conn,
   string* serverHostKeyAlgorithm,
   byte[]* serverHostKey
)
C++/CLI
bool VerifyServerHostKey(
   Connection^ conn,
   String^ serverHostKeyAlgorithm,
   array<byte>^ serverHostKey
)

Parameters

conn
The Connection object
serverHostKeyAlgorithm
The public key algorithm (ssh-rsa or ssh-dss)
serverHostKey
The server's public key blob

Return Value

True if the verifier accepts the server's host key. If set to false, the connection will close.

Remarks

Called by the key exchange code on every key exchange. This may happen several times during the lifetime of a connection.

SSH-2 servers may change host keys at any time.

See Also

Reference

ServerHostKeyVerifier Interface
ServerHostKeyVerifier Members


DebugEventHandler Delegate

[image]
PowerTCP SSH and SFTP for .NET
DebugEventHandler Delegate
See Also Send comments on this topic
Dart.Ssh Namespace : DebugEventHandler Delegate

sender
The source of the event.
e
A DebugDataEventArgs that contains debug information.

Glossary Item Box

Represents the method that will handle an event containing debug data.

Syntax

Visual Basic (Declaration)
Public Delegate Sub DebugEventHandler( _
   ByVal sender As Object, _
   ByVal e As DebugEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As New DebugEventHandler(AddressOf HandlerMethod)
C#
public delegate void DebugEventHandler(
   object sender,
   DebugEventArgs e
)
Managed Extensions for C++
public: __gc __delegate void DebugEventHandler(
   Object* sender,
   DebugEventArgs* e
)
C++/CLI
public delegate void DebugEventHandler(
   Object^ sender,
   DebugEventArgs^ e
)

Parameters

sender
The source of the event.
e
A DebugDataEventArgs that contains debug information.

See Also

Reference

DebugEventHandler Members
Dart.Ssh Namespace


ErrorEventHandler Delegate

[image]
PowerTCP SSH and SFTP for .NET
ErrorEventHandler Delegate
See Also Send comments on this topic
Dart.Ssh Namespace : ErrorEventHandler Delegate

sender
The source of the event.
e
An ErrorEventArgs that contains the error.

Glossary Item Box

Represents the method that will handle Error event raised by the user calling Marshal.

Syntax

Visual Basic (Declaration)
Public Delegate Sub ErrorEventHandler( _
   ByVal sender As Object, _
   ByVal e As ErrorEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As New ErrorEventHandler(AddressOf HandlerMethod)
C#
public delegate void ErrorEventHandler(
   object sender,
   ErrorEventArgs e
)
Managed Extensions for C++
public: __gc __delegate void ErrorEventHandler(
   Object* sender,
   ErrorEventArgs* e
)
C++/CLI
public delegate void ErrorEventHandler(
   Object^ sender,
   ErrorEventArgs^ e
)

Parameters

sender
The source of the event.
e
An ErrorEventArgs that contains the error.

See Also

Reference

ErrorEventHandler Members
Dart.Ssh Namespace


EventHandler Delegate

[image]
PowerTCP SSH and SFTP for .NET
EventHandler Delegate
See Also Send comments on this topic
Dart.Ssh Namespace : EventHandler Delegate

sender
The source of the event.
e
An EventArgs that contains event data.

Glossary Item Box

Represents the method that will handle an event indicating the State property value has changed.

Syntax

Visual Basic (Declaration)
Public Delegate Sub EventHandler( _
   ByVal sender As Object, _
   ByVal e As BaseEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As New EventHandler(AddressOf HandlerMethod)
C#
public delegate void EventHandler(
   object sender,
   BaseEventArgs e
)
Managed Extensions for C++
public: __gc __delegate void EventHandler(
   Object* sender,
   BaseEventArgs* e
)
C++/CLI
public delegate void EventHandler(
   Object^ sender,
   BaseEventArgs^ e
)

Parameters

sender
The source of the event.
e
An EventArgs that contains event data.

See Also

Reference

EventHandler Members
Dart.Ssh Namespace


LogEventHandler Delegate

[image]
PowerTCP SSH and SFTP for .NET
LogEventHandler Delegate
See Also Send comments on this topic
Dart.Ssh Namespace : LogEventHandler Delegate

sender
Object that raised the event.
e
Describes the packet being logged.

Glossary Item Box

Describe the handler used for the Log event.

Syntax

Visual Basic (Declaration)
Public Delegate Sub LogEventHandler( _
   ByVal sender As Object, _
   ByVal e As LogEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As New LogEventHandler(AddressOf HandlerMethod)
C#
public delegate void LogEventHandler(
   object sender,
   LogEventArgs e
)
Managed Extensions for C++
public: __gc __delegate void LogEventHandler(
   Object* sender,
   LogEventArgs* e
)
C++/CLI
public delegate void LogEventHandler(
   Object^ sender,
   LogEventArgs^ e
)

Parameters

sender
Object that raised the event.
e
Describes the packet being logged.

See Also

Reference

LogEventHandler Members
Dart.Ssh Namespace


Sftp.ProgressEventHandler Delegate

[image]
PowerTCP SSH and SFTP for .NET
Sftp.ProgressEventHandler Delegate
See Also Send comments on this topic
Dart.Ssh Namespace : Sftp.ProgressEventHandler Delegate

sender
The source of the event.
e
A ProgressEventArgs that contains event data.

Glossary Item Box

Represents the method that will handle an event indicating a block of data has been copied.

Syntax

Visual Basic (Declaration)
Public Delegate Sub Sftp.ProgressEventHandler( _
   ByVal sender As Object, _
   ByVal e As ProgressEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As New Sftp.ProgressEventHandler(AddressOf HandlerMethod)
C#
public delegate void Sftp.ProgressEventHandler(
   object sender,
   ProgressEventArgs e
)
Managed Extensions for C++
public: __gc __delegate void Sftp.ProgressEventHandler(
   Object* sender,
   ProgressEventArgs* e
)
C++/CLI
public delegate void Sftp.ProgressEventHandler(
   Object^ sender,
   ProgressEventArgs^ e
)

Parameters

sender
The source of the event.
e
A ProgressEventArgs that contains event data.

See Also

Reference

Sftp.ProgressEventHandler Members
Dart.Ssh Namespace


Ssh.SshDataEventHandler Delegate

[image]
PowerTCP SSH and SFTP for .NET
Ssh.SshDataEventHandler Delegate
See Also Send comments on this topic
Dart.Ssh Namespace : Ssh.SshDataEventHandler Delegate

sender
The source of the event.
e
An SshDataEventArgs that contains buffered data.

Glossary Item Box

Represents the method that will handle an event raised by the user calling the Marshal method.

Syntax

Visual Basic (Declaration)
Public Delegate Sub Ssh.SshDataEventHandler( _
   ByVal sender As Object, _
   ByVal e As SshDataEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As New Ssh.SshDataEventHandler(AddressOf HandlerMethod)
C#
public delegate void Ssh.SshDataEventHandler(
   object sender,
   SshDataEventArgs e
)
Managed Extensions for C++
public: __gc __delegate void Ssh.SshDataEventHandler(
   Object* sender,
   SshDataEventArgs* e
)
C++/CLI
public delegate void Ssh.SshDataEventHandler(
   Object^ sender,
   SshDataEventArgs^ e
)

Parameters

sender
The source of the event.
e
An SshDataEventArgs that contains buffered data.

See Also

Reference

Ssh.SshDataEventHandler Members
Dart.Ssh Namespace


SshConnection.BannerEventHandler Delegate

[image]
PowerTCP SSH and SFTP for .NET
SshConnection.BannerEventHandler Delegate
See Also Send comments on this topic
Dart.Ssh Namespace : SshConnection.BannerEventHandler Delegate

sender
The source of the event.
e
A BannerEventArgs that contains event data.

Glossary Item Box

Represents the method that will handle an event raised when the server presents a banner to the client during authentication.

Syntax

Visual Basic (Declaration)
Public Delegate Sub SshConnection.BannerEventHandler( _
   ByVal sender As Object, _
   ByVal e As BannerEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As New SshConnection.BannerEventHandler(AddressOf HandlerMethod)
C#
public delegate void SshConnection.BannerEventHandler(
   object sender,
   BannerEventArgs e
)
Managed Extensions for C++
public: __gc __delegate void SshConnection.BannerEventHandler(
   Object* sender,
   BannerEventArgs* e
)
C++/CLI
public delegate void SshConnection.BannerEventHandler(
   Object^ sender,
   BannerEventArgs^ e
)

Parameters

sender
The source of the event.
e
A BannerEventArgs that contains event data.

See Also

Reference

SshConnection.BannerEventHandler Members
Dart.Ssh Namespace


SshConnection.ChallengeEventHandler Delegate

[image]
PowerTCP SSH and SFTP for .NET
SshConnection.ChallengeEventHandler Delegate
See Also Send comments on this topic
Dart.Ssh Namespace : SshConnection.ChallengeEventHandler Delegate

sender
The source of the event.
e
A ChallengeEventArgs that contains event data.

Glossary Item Box

Represents the method that will handle an event indicating the server is challenging the client with an interactive question or questions.

Syntax

Visual Basic (Declaration)
Public Delegate Sub SshConnection.ChallengeEventHandler( _
   ByVal sender As Object, _
   ByVal e As ChallengeEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As New SshConnection.ChallengeEventHandler(AddressOf HandlerMethod)
C#
public delegate void SshConnection.ChallengeEventHandler(
   object sender,
   ChallengeEventArgs e
)
Managed Extensions for C++
public: __gc __delegate void SshConnection.ChallengeEventHandler(
   Object* sender,
   ChallengeEventArgs* e
)
C++/CLI
public delegate void SshConnection.ChallengeEventHandler(
   Object^ sender,
   ChallengeEventArgs^ e
)

Parameters

sender
The source of the event.
e
A ChallengeEventArgs that contains event data.

See Also

Reference

SshConnection.ChallengeEventHandler Members
Dart.Ssh Namespace


SshConnection.HostKeyEventHandler Delegate

[image]
PowerTCP SSH and SFTP for .NET
SshConnection.HostKeyEventHandler Delegate
See Also Send comments on this topic
Dart.Ssh Namespace : SshConnection.HostKeyEventHandler Delegate

sender
The source of the event.
e
A HostKeyEventArgs that contains event data.

Glossary Item Box

Represents the method that will handle an event raised when the server presents its host key for verification.

Syntax

Visual Basic (Declaration)
Public Delegate Sub SshConnection.HostKeyEventHandler( _
   ByVal sender As Object, _
   ByVal e As HostKeyEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As New SshConnection.HostKeyEventHandler(AddressOf HandlerMethod)
C#
public delegate void SshConnection.HostKeyEventHandler(
   object sender,
   HostKeyEventArgs e
)
Managed Extensions for C++
public: __gc __delegate void SshConnection.HostKeyEventHandler(
   Object* sender,
   HostKeyEventArgs* e
)
C++/CLI
public delegate void SshConnection.HostKeyEventHandler(
   Object^ sender,
   HostKeyEventArgs^ e
)

Parameters

sender
The source of the event.
e
A HostKeyEventArgs that contains event data.

See Also

Reference

SshConnection.HostKeyEventHandler Members
Dart.Ssh Namespace


UserStateEventHandler Delegate

[image]
PowerTCP SSH and SFTP for .NET
UserStateEventHandler Delegate
See Also Send comments on this topic
Dart.Ssh Namespace : UserStateEventHandler Delegate

sender
The source of the event.
e
A UserStateEventArgs that contains user data.

Glossary Item Box

Represents the method that will handle UserState event raised by the user calling Marshal.

Syntax

Visual Basic (Declaration)
Public Delegate Sub UserStateEventHandler( _
   ByVal sender As Object, _
   ByVal e As UserStateEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As New UserStateEventHandler(AddressOf HandlerMethod)
C#
public delegate void UserStateEventHandler(
   object sender,
   UserStateEventArgs e
)
Managed Extensions for C++
public: __gc __delegate void UserStateEventHandler(
   Object* sender,
   UserStateEventArgs* e
)
C++/CLI
public delegate void UserStateEventHandler(
   Object^ sender,
   UserStateEventArgs^ e
)

Parameters

sender
The source of the event.
e
A UserStateEventArgs that contains user data.

See Also

Reference

UserStateEventHandler Members
Dart.Ssh Namespace


Assembly Overview

Dart.Ssh Assembly
See Also Send comments on this topic

Glossary Item Box

Namespaces

Namespace | Description
Dart.Ssh |


Getting Started - PowerTCP SSH and SFTP for .NET

Getting Started
Send comments on this topic

Glossary Item Box


Introduction - PowerTCP SSH and SFTP for .NET

Introduction
Send comments on this topic

Glossary Item Box


ChannelPacket Class Fields

[image]
PowerTCP SSH and SFTP for .NET
ChannelPacket Class Fields
See Also Send comments on this topic
Dart.Ssh Namespace : ChannelPacket Class

Glossary Item Box

For a list of all members of this type, see ChannelPacket members.

Public Fields

 | Name | Description
Public Field | Content | The bytes sent or received. (Inherited from Dart.Ssh.Packet)
Top

See Also

Reference

ChannelPacket Class
Dart.Ssh Namespace


GetRemainingAuthMethods Method

[image]
PowerTCP SSH and SFTP for .NET
GetRemainingAuthMethods Method
See Also Send comments on this topic
Dart.Ssh Namespace > Connection Class : GetRemainingAuthMethods Method

Glossary Item Box

Checks which authentication methods are supported by the server at the current stage of the authentication process.

Overload List

Overload | Description
GetRemainingAuthMethods | Checks which authentication methods are supported by the server at the current stage of the authentication process.

See Also

Reference

Connection Class
Connection Members


CopyResult Class Methods

[image]
PowerTCP SSH and SFTP for .NET
CopyResult Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : CopyResult Class

Glossary Item Box

For a list of all members of this type, see CopyResult members.

Public Methods

 | Name | Description
Public Method | GetException | Gets any Exception that occurred during the operation. (Inherited from Dart.Ssh.RemoveResult)
Top

See Also

Reference

CopyResult Class
Dart.Ssh Namespace


DartLicenseException Class Events

[image]
PowerTCP SSH and SFTP for .NET
DartLicenseException Class Events
See Also Send comments on this topic
Dart.Ssh Namespace : DartLicenseException Class

Glossary Item Box

For a list of all members of this type, see DartLicenseException members.

Protected Events

 | Name | Description
Protected Event | SerializeObjectState | Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Inherited from System.Exception)
Top

See Also

Reference

DartLicenseException Class
Dart.Ssh Namespace


DartLicenseException Class Methods

[image]
PowerTCP SSH and SFTP for .NET
DartLicenseException Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : DartLicenseException Class

Glossary Item Box

For a list of all members of this type, see DartLicenseException members.

Public Methods

 | Name | Description
Public Method | GetBaseException | When overridden in a derived class, returns the System.Exception that is the root cause of one or more subsequent exceptions. (Inherited from System.Exception)
Public Method | GetObjectData | When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception. (Inherited from System.Exception)
Public Method | GetType | Gets the runtime type of the current instance. (Inherited from System.Exception)
Public Method | ToString | Creates and returns a string representation of the current exception. (Inherited from System.Exception)
Top

See Also

Reference

DartLicenseException Class
Dart.Ssh Namespace


DartLicenseException Class Properties

[image]
PowerTCP SSH and SFTP for .NET
DartLicenseException Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : DartLicenseException Class

Glossary Item Box

For a list of all members of this type, see DartLicenseException members.

Public Properties

 | Name | Description
Public Property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from System.Exception)
Public Property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from System.Exception)
Public Property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from System.Exception)
Public Property | InnerException | Gets the System.Exception instance that caused the current exception. (Inherited from System.Exception)
Public Property | Message | Gets a message that describes the current exception. (Inherited from System.Exception)
Public Property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from System.Exception)
Public Property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from System.Exception)
Public Property | TargetSite | Gets the method that throws the current exception. (Inherited from System.Exception)
Top

See Also

Reference

DartLicenseException Class
Dart.Ssh Namespace


HttpProxyException Class Events

[image]
PowerTCP SSH and SFTP for .NET
HttpProxyException Class Events
See Also Send comments on this topic
Dart.Ssh Namespace : HttpProxyException Class

Glossary Item Box

For a list of all members of this type, see HttpProxyException members.

Protected Events

 | Name | Description
Protected Event | SerializeObjectState | Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Inherited from System.Exception)
Top

See Also

Reference

HttpProxyException Class
Dart.Ssh Namespace
Proxy Property


HttpProxyException Class Methods

[image]
PowerTCP SSH and SFTP for .NET
HttpProxyException Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : HttpProxyException Class

Glossary Item Box

For a list of all members of this type, see HttpProxyException members.

Public Methods

 | Name | Description
Public Method | GetBaseException | When overridden in a derived class, returns the System.Exception that is the root cause of one or more subsequent exceptions. (Inherited from System.Exception)
Public Method | GetObjectData | When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception. (Inherited from System.Exception)
Public Method | GetType | Gets the runtime type of the current instance. (Inherited from System.Exception)
Public Method | ToString | Creates and returns a string representation of the current exception. (Inherited from System.Exception)
Top

See Also

Reference

HttpProxyException Class
Dart.Ssh Namespace
Proxy Property


IPEndPoint Class Methods

[image]
PowerTCP SSH and SFTP for .NET
IPEndPoint Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : IPEndPoint Class

Glossary Item Box

For a list of all members of this type, see IPEndPoint members.

Public Methods

 | Name | Description
Public Method | Create | (Inherited from System.Net.IPEndPoint)
Public Method | Equals | (Inherited from System.Net.IPEndPoint)
Public Method | GetHashCode | (Inherited from System.Net.IPEndPoint)
Public Method | Serialize | (Inherited from System.Net.IPEndPoint)
Public Method | ToString | (Inherited from System.Net.IPEndPoint)
Top

See Also

Reference

IPEndPoint Class
Dart.Ssh Namespace


NegotiateException Class Events

[image]
PowerTCP SSH and SFTP for .NET
NegotiateException Class Events
See Also Send comments on this topic
Dart.Ssh Namespace : NegotiateException Class

Glossary Item Box

For a list of all members of this type, see NegotiateException members.

Protected Events

 | Name | Description
Protected Event | SerializeObjectState | Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Inherited from System.Exception)
Top

See Also

Reference

NegotiateException Class
Dart.Ssh Namespace


NegotiateException Class Methods

[image]
PowerTCP SSH and SFTP for .NET
NegotiateException Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : NegotiateException Class

Glossary Item Box

For a list of all members of this type, see NegotiateException members.

Public Methods

 | Name | Description
Public Method | GetBaseException | When overridden in a derived class, returns the System.Exception that is the root cause of one or more subsequent exceptions. (Inherited from System.Exception)
Public Method | GetObjectData | When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception. (Inherited from System.Exception)
Public Method | GetType | Gets the runtime type of the current instance. (Inherited from System.Exception)
Public Method | ToString | Creates and returns a string representation of the current exception. (Inherited from System.Exception)
Top

See Also

Reference

NegotiateException Class
Dart.Ssh Namespace


NegotiateException Class Properties

[image]
PowerTCP SSH and SFTP for .NET
NegotiateException Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : NegotiateException Class

Glossary Item Box

For a list of all members of this type, see NegotiateException members.

Public Properties

 | Name | Description
Public Property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from System.Exception)
Public Property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from System.Exception)
Public Property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from System.Exception)
Public Property | InnerException | Gets the System.Exception instance that caused the current exception. (Inherited from System.Exception)
Public Property | Message | Gets a message that describes the current exception. (Inherited from System.Exception)
Public Property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from System.Exception)
Public Property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from System.Exception)
Public Property | TargetSite | Gets the method that throws the current exception. (Inherited from System.Exception)
Top

See Also

Reference

NegotiateException Class
Dart.Ssh Namespace


SessionStream Constructor

[image]
PowerTCP SSH and SFTP for .NET
SessionStream Constructor
See Also Send comments on this topic
Dart.Ssh Namespace > SessionStream Class : SessionStream Constructor

Glossary Item Box

Overload List

Overload | Description
SessionStream Constructor | Provides a stream interface to a Session.

See Also

Reference

SessionStream Class
SessionStream Members


SftpException Class Events

[image]
PowerTCP SSH and SFTP for .NET
SftpException Class Events
See Also Send comments on this topic
Dart.Ssh Namespace : SftpException Class

Glossary Item Box

For a list of all members of this type, see SftpException members.

Protected Events

 | Name | Description
Protected Event | SerializeObjectState | Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Inherited from System.Exception)
Top

See Also

Reference

SftpException Class
Dart.Ssh Namespace


SftpException Class Methods

[image]
PowerTCP SSH and SFTP for .NET
SftpException Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : SftpException Class

Glossary Item Box

For a list of all members of this type, see SftpException members.

Public Methods

 | Name | Description
Public Method | GetBaseException | When overridden in a derived class, returns the System.Exception that is the root cause of one or more subsequent exceptions. (Inherited from System.Exception)
Public Method | GetObjectData | When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception. (Inherited from System.Exception)
Public Method | GetType | Gets the runtime type of the current instance. (Inherited from System.Exception)
Public Method | ToString | Creates and returns a string representation of the current exception. (Inherited from System.Exception)
Top

See Also

Reference

SftpException Class
Dart.Ssh Namespace


SftpPacket Class Fields

[image]
PowerTCP SSH and SFTP for .NET
SftpPacket Class Fields
See Also Send comments on this topic
Dart.Ssh Namespace : SftpPacket Class

Glossary Item Box

For a list of all members of this type, see SftpPacket members.

Public Fields

 | Name | Description
Public Field | Content | The bytes sent or received. (Inherited from Dart.Ssh.Packet)
Top

See Also

Reference

SftpPacket Class
Dart.Ssh Namespace


SocketBase Class Events

[image]
PowerTCP SSH and SFTP for .NET
SocketBase Class Events
See Also Send comments on this topic
Dart.Ssh Namespace : SocketBase Class

Glossary Item Box

For a list of all members of this type, see SocketBase members.

Public Events

 | Name | Description
Public Event | Disposed | (Inherited from System.ComponentModel.Component)
Public Event | Error | Raised when Marshal(Exception) is used or an unhandled Exception is thrown in a worker thread created using Start. (Inherited from Dart.Ssh.ComponentBase)
Public Event | UserState | Raised when Marshal(String,Object) is used. (Inherited from Dart.Ssh.ComponentBase)
Top

See Also

Reference

SocketBase Class
Dart.Ssh Namespace


Ssh Class Properties

[image]
PowerTCP SSH and SFTP for .NET
Ssh Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : Ssh Class

Glossary Item Box

For a list of all members of this type, see Ssh members.

Public Properties

 | Name | Description
Public Property | AcceptAllHostKeys | When true, all host keys are accepted if not overridden with HostKeyEventArgs.Verified. When false, the SshConnection.HostKey event must be used to verify host keys. (Inherited from Dart.Ssh.SshConnection)
Public Property | Connection | Gets the underlying Connection instance being used for server communications. (Inherited from Dart.Ssh.SshConnection)
Public Property | Container | (Inherited from System.ComponentModel.Component)
Public Property | Encoding | Character encoding used by the component. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Site | (Inherited from System.ComponentModel.Component)
Public Property | State | Gets a value that reflects the current TCP connection state and SSH authentication state. (Inherited from Dart.Ssh.SshConnection)
Public Property | SynchronizingObject | Gets or sets the object used to marshal data to the UI thread (for raising events). (Inherited from Dart.Ssh.ComponentBase)
Public Property | SyncRoot | Gets an object that is used to synchronize access to the upper layer protocol in use. (Inherited from Dart.Ssh.ComponentBase)
Public Property | Tag | Gets or sets an object that stores any user data. (Inherited from Dart.Ssh.ComponentBase)
Public Property | ThreadingModel | Controls the threading model used by the component. (Inherited from Dart.Ssh.ComponentBase)
Top

Protected Properties

 | Name | Description
Protected Property | CanRaiseEvents | (Inherited from System.ComponentModel.Component)
Protected Property | DesignMode | (Inherited from System.ComponentModel.Component)
Protected Property | Events | (Inherited from System.ComponentModel.Component)
Top

See Also

Reference

Ssh Class
Dart.Ssh Namespace


SshDataEventArgs Class Methods

[image]
PowerTCP SSH and SFTP for .NET
SshDataEventArgs Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : SshDataEventArgs Class

Glossary Item Box

For a list of all members of this type, see SshDataEventArgs members.

Public Methods

 | Name | Description
Public Method | ToString | Gets the Data property as a decoded string. (Inherited from Dart.Ssh.DataEventArgs)
Top

See Also

Reference

SshDataEventArgs Class
Dart.Ssh Namespace


ZStream Class Properties

[image]
PowerTCP SSH and SFTP for .NET
ZStream Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : ZStream Class

Glossary Item Box

For a list of all members of this type, see ZStream members.

Public Properties

 | Name | Description
Public Property | CanRead | (Inherited from Dart.Ssh.BaseStream)
Public Property | CanSeek | (Inherited from Dart.Ssh.BaseStream)
Public Property | CanTimeout | Gets a value that determines whether the current stream can time out. (Inherited from System.IO.Stream)
Public Property | CanWrite | (Inherited from Dart.Ssh.BaseStream)
Public Property | Length | (Inherited from Dart.Ssh.BaseStream)
Public Property | Position | (Inherited from Dart.Ssh.BaseStream)
Public Property | ReadTimeout | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out. (Inherited from System.IO.Stream)
Public Property | WriteTimeout | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out. (Inherited from System.IO.Stream)
Top

See Also

Reference

ZStream Class
Dart.Ssh Namespace


ZStreamException Class Events

[image]
PowerTCP SSH and SFTP for .NET
ZStreamException Class Events
See Also Send comments on this topic
Dart.Ssh Namespace : ZStreamException Class

Glossary Item Box

For a list of all members of this type, see ZStreamException members.

Protected Events

 | Name | Description
Protected Event | SerializeObjectState | Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Inherited from System.Exception)
Top

See Also

Reference

ZStreamException Class
Dart.Ssh Namespace


ZStreamException Class Methods

[image]
PowerTCP SSH and SFTP for .NET
ZStreamException Class Methods
See Also Send comments on this topic
Dart.Ssh Namespace : ZStreamException Class

Glossary Item Box

For a list of all members of this type, see ZStreamException members.

Public Methods

 | Name | Description
Public Method | GetBaseException | When overridden in a derived class, returns the System.Exception that is the root cause of one or more subsequent exceptions. (Inherited from System.Exception)
Public Method | GetObjectData | When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception. (Inherited from System.Exception)
Public Method | GetType | Gets the runtime type of the current instance. (Inherited from System.Exception)
Public Method | ToString | Creates and returns a string representation of the current exception. (Inherited from System.Exception)
Top

See Also

Reference

ZStreamException Class
Dart.Ssh Namespace


ZStreamException Class Properties

[image]
PowerTCP SSH and SFTP for .NET
ZStreamException Class Properties
See Also Send comments on this topic
Dart.Ssh Namespace : ZStreamException Class

Glossary Item Box

For a list of all members of this type, see ZStreamException members.

Public Properties

 | Name | Description
Public Property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from System.Exception)
Public Property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from System.Exception)
Public Property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from System.Exception)
Public Property | InnerException | Gets the System.Exception instance that caused the current exception. (Inherited from System.Exception)
Public Property | Message | Gets a message that describes the current exception. (Inherited from System.Exception)
Public Property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from System.Exception)
Public Property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from System.Exception)
Public Property | TargetSite | Gets the method that throws the current exception. (Inherited from System.Exception)
Top

See Also

Reference

ZStreamException Class
Dart.Ssh Namespace


Dart.Ssh Namespace Inheritance Hierarchy

Dart.Ssh Namespace Inheritance Hierarchy
See Also Send comments on this topic

Glossary Item Box

Inheritance Hierarchy

System.Object
Dart.Ssh.Connection
Dart.Ssh.ConnectionInfo
Dart.Ssh.DebugData
Dart.Ssh.DHGexParameters
Dart.Ssh.ListEntry
Dart.Ssh.ListProgress
Dart.Ssh.LocalPortForwarder
Dart.Ssh.LoginData
Dart.Ssh.HttpProxyData
Dart.Ssh.SshLoginData
Dart.Ssh.Optimizations
Dart.Ssh.Packet
Dart.Ssh.ChannelPacket
Dart.Ssh.SftpPacket
Dart.Ssh.RemoveResult
Dart.Ssh.CopyResult
Dart.Ssh.Segment
Dart.Ssh.Data
Dart.Ssh.Session
Dart.Ssh.SftpFileAttributes
System.EventArgs
Dart.Ssh.BannerEventArgs
Dart.Ssh.BaseEventArgs
Dart.Ssh.DebugEventArgs
Dart.Ssh.LogEventArgs
Dart.Ssh.ProgressEventArgs
Dart.Ssh.ChallengeEventArgs
Dart.Ssh.ErrorEventArgs
Dart.Ssh.HostKeyEventArgs
Dart.Ssh.UserStateEventArgs
Dart.Ssh.DataEventArgs
Dart.Ssh.SshDataEventArgs
System.Exception
Dart.Ssh.DartLicenseException
Dart.Ssh.NegotiateException
System.SystemException
System.IO.IOException
Dart.Ssh.HttpProxyException
Dart.Ssh.SftpException
Dart.Ssh.ZStreamException
System.MarshalByRefObject
System.ComponentModel.Component
Dart.Ssh.ComponentBase
Dart.Ssh.SocketBase
Dart.Ssh.SshConnection
Dart.Ssh.Sftp
Dart.Ssh.Ssh
System.IO.Stream
Dart.Ssh.BaseStream
Dart.Ssh.ZStream
Dart.Ssh.SessionStream
System.Net.EndPoint
System.Net.IPEndPoint
Dart.Ssh.IPEndPoint

See Also

Reference

Dart.Ssh Assembly


PowerTCP in Partial Trust Environments

PowerTCP in Partial Trust Environments
Send comments on this topic

Glossary Item Box

Partial Trust

Partial Trust environments such as shared hosting in ASP.NET limit access to potentially harmful .NET framework classes and methods. Because of this, some additional configuration is required in order to use Dart's components in these restricted environments. When developing a system service, console application, windows forms application, or web application that will run with Full Trust, no additional configuration is necessary.

Background

The Windows API can access system services that a system administrator may not want to expose. For example, a web hosting service may not want hosted code to access the file system. Microsoft calls limiting such access “Code Access Security”, well-documented in the MSDN article Using Code Access Security with ASP.NET.

Dart assemblies are marked with the 'AllowPartiallyTrustedCallers' assembly attribute for use in Partial Trust Environments. Using Dart's components in a Partial Trust environment requires additional configuration such as installing the component dll into the GAC or creating a custom security policy.

Installation into the GAC

When a Dart assembly is installed into the GAC, the component is granted full trust and asserts the required permissions at runtime so that no custom Security Policy is required. This is the preferred technique for using Dart components in Partial Trust environments.

Custom Security Policies

Security policy files are used to define a permission set that applications running under them can be granted. Under ASP.NET the web.config file can be used to specify which Security Policy should be used. Custom Security Policy files can be used to explicitly grant permissions that are required by the application and its references. However, some .NET Framework features are restricted regardless of Security Policy settings and will typically result in System.Security.SecurityException when used. Because of this, some components may have limited functionality in partial trust environments; if full functionality is required then the Dart component must be installed into the GAC.

Defining a Custom Security Policy

A custom Security Policy should only be used if an application using a Dart component is not run in Full Trust or the Dart component's assembly is not installed into the GAC.

Note: Version numbers mentioned in the following instructions reflect the version of the .NET Framework that permissions are being requested for; if .NET 2.0 is targeted then the appropriate version number should be substituted.

To define a custom Security Policy:

  1. Copy and paste the default web_mediumtrust.config file located at C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web_mediumtrust.config
  2. Rename the copied config file, ex: web_mediumtrust_custom.config

  3. Add the SocketPermission class definition to the SecurityClasses section:

    <SecurityClass
        Name="SocketPermission"
        Description="System.Net.SocketPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

  4. Add SocketPermission to the ASP.NET NamedPermissionSet section:

    <Ipermission
         class="SocketPermission"
         version="1"
         Unrestricted="true" />

  5. Add the UnmanagedCode flag to the SecurityPermision definition:

    <Ipermission
         class="SecurityPermission"
         version="1"
         Flags="UnmanagedCode, Execution, ControlThread, ControlPrincipal, RemotingConfiguration" />

  6. Save the file

Configuring the Security Policy in web.config

To direct an ASP.NET application to use medium trust add the following to the system.web section:

<trust level="Medium"/>

To use a custom Security Policy, add the following to the system.web section:

<securityPolicy>
     <trustLevel name="CustomMedium" policyFile="C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web_mediumtrust_custom.config" />
</securityPolicy>
<trust level="CustomMedium"/>

Alternatively, an assembly that requires full trust can be added to the application's web.config securityPolicy section:

<securityPolicy>
   <fullTrustAssemblies>
     <add assemblyName="Dart.Snmp" version="4.7.0.0" publicKey="00240000048000009400000006020000002400005253413100040000010001003fc01cbb4168cbdbb48a763283bd3a3e48dba81e06c4179db0bf20ba775a188f5c06c7bc1d7f39c22d63a04e3c16b424da9174dc28a019097458bcbea3e0e5184854a07382e3329cf82ce6004731b25eb7b9d56d9682df5606806b894974d0d42b960a2498a756f38904a1cac14e41a9b5debb62276e94e37934d5f1cc9838dd"/>
   </fullTrustAssemblies>
</securityPolicy>

Update the assemblyName, version and publicKey as needed for the product in use. To extract the public key from an assembly, use the 'sn' utility with the '-Tp' option from the Visual Studio command prompt.