SshSession Class
Namespace: Rebex.Net
Assembly: Rebex.Networking.dll (version 7.0.9313)
Represents a client-side SSH 2.0 session.
Syntax
public class SshSession : NetworkSession, ILogWriterProvider, IDisposable
Inherited Members
Constructors
| Name | Description |
|---|---|
|
Ssh |
Initializes an instance of the Ssh |
|
Ssh |
Initializes an instance of the Ssh |
|
Ssh |
Initializes an instance of the Ssh |
Fields
| Name | Description |
|---|---|
|
Default |
Default SSH port (22). |
Properties
| Name | Description |
|---|---|
| Cipher | Gets the active cipher. |
|
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. |
|
Has |
Gets a value indicating whether the Authentication |
|
Has |
Gets a value indicating whether the Fingerprint |
|
Has |
Gets a value indicating whether the Forwarding |
| Information | Gets socket information on the underlying socket object. |
|
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 endpoint. |
|
Log |
Gets or sets the Log |
| Options | Gets or sets SshSession options. |
| Parameters | Gets or sets the security parameters of the current socket. |
|
Remote |
Gets the remote endpoint. |
|
Server |
Gets the server's identification string it returns after connected. |
|
Server |
Gets information about SSH negotiation. |
|
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 |
| Socket | Gets the internal ISocket value. |
| State | Gets the current session state. |
| Timeout | Gets or sets the length of time 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 |
Methods
| Name | Description |
|---|---|
|
Accept |
Accepts a forwarded incoming connection. If there is no incoming connection in the queue, waits indefinitely. |
|
Accept |
Accepts a forwarded incoming connection. |
|
Authenticate(Ssh |
Authenticates to the server using GSSAPI. Kerberos is only supported on Mono. NTLM is supported on Windows and partially on Mono. |
| Authenticate(String) | Authenticates to the SSH server interactively.
Uses Authentication |
|
Authenticate(String, Ssh |
Authenticates to the SSH server using a username and a private key that is stored in |
|
Authenticate(String, Ssh |
Authenticates to the SSH server using a username and an RSA or DSA private key. |
| Authenticate(String, String) | Authenticates to the SSH server using a username and password. |
|
Authenticate(String, String, Ssh |
Authenticates to the SSH server using a username and an RSA or DSA private key and a password. |
|
Authenticate(String, String, Ssh |
Authenticates to the SSH server using a username and an RSA or DSA private key and a password. |
|
Change |
Changes the specified user's password on the SSH server and authenticates. |
|
Connect(End |
Establishes a connection to an SSH server. |
| Connect(String) | Establishes a connection to port 22 of an SSH server. |
| Connect(String, Int32) | Establishes a connection to an SSH server. |
| Disconnect() | Terminates the SSH session. |
| Dispose() | Disposes the Ssh |
|
Get |
Gets hash code for this object.
Inherited from Network |
|
Keep |
Sends an SSH_MSG_IGNORE packet to the server. |
| Negotiate() | Requests and/or performs a key exchange. |
|
On |
Raises the Authentication |
|
On |
Raises the Banner |
|
On |
Raises the Fingerprint |
|
Open |
Opens an SSH channel of the specified type. |
|
Open |
Opens an SSH session channel. |
|
Open |
Opens an outgoing TCP/IP tunnel to the specified remote endpoint. |
|
Open |
Opens an outgoing TCP/IP tunnel to the specified remote endpoint. |
|
Start |
Starts incoming TCP/IP tunnel on the specified IP address and port at the SSH server. |
|
Stop |
Stops an incoming TCP/IP tunnel. |
|
To |
Gets a socket factory that creates socket tunneled through this SSH session. |
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. |
|
Fingerprint |
Occurs when a fingerprint is received from the server and needs to be validated. |
|
Forwarding |
Occurs when an incoming tunnel request has arrived. |