Scp Class
Namespace: Rebex.Net
Assembly: Rebex.Sftp.dll (version 7.0.9147)
Provides methods for communication using SCP.
Syntax
public class Scp : NetworkSession, ILogWriterProvider, IDisposable
Inherited Members
Remarks
All members of this class are thread-safe.
Constructors
Name | Description |
---|---|
Scp() | Initializes a new instance of the Scp class. |
Fields
Name | Description |
---|---|
Default |
Default SCP port (22). |
Properties
Name | Description |
---|---|
Default |
Gets or sets a default log writer used by all new instances of Network |
Encoding | Gets or sets the Encoding to use to encode and decode command parameters and server responses. |
Fingerprint | Gets the server public key fingerprint (a SHA-256 hash of the server public key). |
Instance |
Gets instance ID (intended for logging purposes).
Inherited from Network |
Is |
Gets a value indicating whether the session is authenticated. |
Is |
Gets a value indicating whether the session is connected. |
Local |
Gets the local client End |
Log |
Gets or sets the Log |
Proxy | Gets or sets the network proxy to use to access a remote server. |
Remote |
Gets the remote server End |
Server |
Gets the server public key. |
Server |
Gets the server name, if available.
Inherited from Network |
Server |
Gets the server port, if available.
Inherited from Network |
Session | Gets the SSH session used by this SCP session. |
Settings | Gets or sets SCP object settings. |
Timeout | Gets or sets the length of time in milliseconds before the operation times out (specify -1 or 0 to indicate that the request does not time out). |
User |
Gets the authenticated user name, if available.
Inherited from Network |
Version | Gets the version of the SCP component. |
Methods
Name | Description |
---|---|
Bind(Ssh |
Binds the Scp object to an underlying SSH session. This can be used instead of Connect(String)/Login(String, String) methods. |
Connect(String) | Connects to the SCP host. |
Connect(String, Int32) | Connects to the SCP host. |
Connect |
Begins asynchronous Connect operation. Connects to the SCP host. |
Connect |
Begins asynchronous Connect operation. Connects to the SCP host. |
Create |
Creates a directory on the server. |
Create |
Begins asynchronous CreateDirectory operation. Creates a directory on the server. |
Disconnect() | Informs the server that the connection is about to close and terminates the connection. |
Disconnect |
Begins asynchronous Disconnect operation. Informs the server that the connection is about to close and terminates the connection. |
Dispose() | Disposes the Scp object and all the socket objects. |
Dispose(Boolean) | Releases the unmanaged resources used by the Scp and optionally releases the managed resources. |
Download(String, String) | Downloads the content of the remote directory (files and all subfolders) to the specified local directory. |
Download |
Begins asynchronous Download operation. Downloads the content of the remote directory (files and all subfolders) to the specified local directory. |
Finalize() | Finalizer. Called by garbage collector during object destruction. |
Get |
Downloads the remote file to the data stream. |
Get |
Downloads the remote file to the local file, overriding it if it already exists. |
Get |
Begins asynchronous GetFile operation. Downloads the remote file to the data stream. |
Get |
Begins asynchronous GetFile operation. Downloads the remote file to the local file, overriding it if it already exists. |
Get |
Gets hash code for this object.
Inherited from Network |
Login() | Authenticates the user to the server interactively and initializes the SCP session.
Uses Authentication |
Login(Ssh |
Authenticates to the server using GSSAPI. Kerberos is only supported on Mono. NTLM is supported on Windows and partially on Mono. |
Login(String) | Authenticates the user to the server interactively and initializes the SCP session.
Uses Authentication |
Login(String, Ssh |
Authenticates the user to the server using his private key and initializes the SCP session. |
Login(String, Ssh |
Authenticates the user to the server using his private key and initializes the SCP session. |
Login(String, String) | Authenticates the user to the server and initializes the SCP session. |
Login(String, String, Ssh |
Authenticates the user to the server using a combination of password and public key and initializes the SCP session. |
Login(String, String, Ssh |
Authenticates the user to the server using a combination of password and public key and initializes the SCP session. |
Login |
Begins asynchronous Login operation. Authenticates to the server using GSSAPI. Kerberos is only supported on Mono. NTLM is supported on Windows and partially on Mono. |
Login |
Begins asynchronous Login operation.
Authenticates the user to the server interactively and initializes the SCP session.
Uses Authentication |
Login |
Begins asynchronous Login operation. Authenticates the user to the server using his private key and initializes the SCP session. |
Login |
Begins asynchronous Login operation. Authenticates the user to the server using his private key and initializes the SCP session. |
Login |
Begins asynchronous Login operation.
Authenticates the user to the server interactively and initializes the SCP session.
Uses Authentication |
Login |
Begins asynchronous Login operation. Authenticates the user to the server using a combination of password and public key and initializes the SCP session. |
Login |
Begins asynchronous Login operation. Authenticates the user to the server using a combination of password and public key and initializes the SCP session. |
Login |
Begins asynchronous Login operation. Authenticates the user to the server and initializes the SCP session. |
On |
Raises the Batch |
On |
Raises the Transfer |
Put |
Uploads the content of the data stream to the file on the server, overriding it if it already exists. |
Put |
Uploads the content of the local file to the file on the server, overriding it if it already exists. |
Put |
Begins asynchronous PutFile operation. Uploads the content of the data stream to the file on the server, overriding it if it already exists. |
Put |
Begins asynchronous PutFile operation. Uploads the content of the local file to the file on the server, overriding it if it already exists. |
Set |
Sets the socket factory to be used to create communication sockets. |
To |
Returns a string representation of this object. |
Upload(String, String) | Uploads the content of the local directory (files and all subfolders) to the specified remote directory. |
Upload |
Begins asynchronous Upload operation. Uploads the content of the local directory (files and all subfolders) to the specified remote directory. |
Events
Name | Description |
---|---|
Authentication |
Occurs when an authentication request is received from the server that cannot be answered programmatically. |
Banner |
Occurs when a banner message is received from the server. |
Batch |
Occurs when a significant action occurs in Download(String, String) or Upload(String, String) methods. |
Fingerprint |
Occurs when a fingerprint is received from the server and needs to be validated. |
Transfer |
Occurs when data is send or received. |