The SshSession type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| SshSession()()()() |
Initializes an instance of the SshSession class.
| |
| SshSession(Socket) |
Initializes an instance of the SshSession class with the specified base socket.
| |
| SshSession(ISocket) |
Initializes an instance of the SshSession class with the specified base socket.
|
Methods
| Name | Description | |
|---|---|---|
| AcceptTcpIpForward(SshForwardingHandle) |
Accepts a forwarded incoming connection. If there is no incoming connection in the queue, waits indefinitely.
| |
| AcceptTcpIpForward(SshForwardingHandle, Int32) |
Accepts a forwarded incoming connection.
| |
| Authenticate(String) |
Authenticates to the SSH server interactively.
Uses AuthenticationRequest to ask for credentials.
| |
| Authenticate(SshGssApiCredentials) |
Authenticates to the server using GSSAPI.
Kerberos is only supported on Mono.
NTLM is supported on Windows and partially on Mono.
| |
| Authenticate(String, SshPrivateKey) |
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, SshPrivateKey) |
Authenticates to the SSH server using a username and an RSA or DSA private key and a password.
| |
| Close | Obsolete. | |
| Connect(EndPoint) |
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 SshSession object and the underlying socket object.
| |
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| GetHashCode | Serves as a hash function for a particular type. GetHashCode()()()() is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| ChangePassword |
Changes the specified user's password on the SSH server and authenticates.
| |
| KeepAlive |
Sends an SSH_MSG_IGNORE packet to the server.
| |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| Negotiate |
Requests and/or performs a key exchange.
| |
| OnAuthenticationRequest |
Raises the AuthenticationRequest event.
| |
| OnBannerReceived |
Raises the BannerReceived event.
| |
| OnFingerprintCheck |
Raises the FingerprintCheck event.
| |
| OpenChannel |
Opens an SSH channel of the specified type.
| |
| OpenSession |
Opens an SSH session channel.
| |
| OpenTcpIpTunnel(IPEndPoint) |
Opens an outgoing TCP/IP tunnel to the specified remote endpoint.
| |
| OpenTcpIpTunnel(String, Int32) |
Opens an outgoing TCP/IP tunnel to the specified remote endpoint.
| |
| StartTcpIpForward |
Starts incoming TCP/IP tunnel on the specified IP address and port at the SSH server.
| |
| StopTcpIpForward |
Stops an incoming TCP/IP tunnel.
| |
| ToSocketFactory |
Gets a socket factory that creates socket tunneled through this SSH session.
| |
| ToString | Returns a String that represents the current Object. (Inherited from Object.) |
Fields
| Name | Description | |
|---|---|---|
| DefaultPort |
Default SSH port (22).
|
Properties
| Name | Description | |
|---|---|---|
| Authenticated | Obsolete. | |
| Cipher |
Gets the active cipher.
| |
| Connected | Obsolete. | |
| Encoding |
Gets or sets the Encoding to use to encode and decode command parameters and server responses.
| |
| Fingerprint |
Gets the server public key fingerprint.
| |
| HasAuthenticationRequestEventHandler |
Gets a value indicating whether the AuthenticationRequest event is registered.
| |
| HasFingerprintEventHandler |
Gets a value indicating whether the FingerprintCheck event is registered.
| |
| HasForwardingRequestEventHandler |
Gets a value indicating whether the ForwardingRequest event is registered.
| |
| Information |
Gets socket information on the underlying socket object.
| |
| InstanceId |
Gets instance ID (intended for logging purposes).
(Inherited from NetworkSession.) | |
| IsAuthenticated |
Gets a value indicating whether the session is authenticated.
(Overrides NetworkSession..::..IsAuthenticated.) | |
| IsConnected |
Gets a value indicating whether the session is connected.
(Overrides NetworkSession..::..IsConnected.) | |
| LocalEndPoint |
Gets the local endpoint.
| |
| LogWriter |
Gets or sets the LogWriter used by this object.
(Inherited from NetworkSession.) | |
| Options |
Gets or sets SshSession options.
| |
| Parameters |
Gets or sets the security parameters of the current socket.
| |
| RemoteEndPoint |
Gets the remote endpoint.
| |
| ServerIdentification |
Gets the server's identification string it returns after connected.
| |
| ServerInfo |
Gets information about SSH negotiation.
| |
| ServerKey |
Gets the server public key.
| |
| ServerName |
Gets the server name, if available.
(Inherited from NetworkSession.) | |
| ServerPort |
Gets the server port, if available.
(Inherited from NetworkSession.) | |
| 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).
| |
| UserName |
Gets the authenticated user name, if available.
(Inherited from NetworkSession.) |
Events
| Name | Description | |
|---|---|---|
| AuthenticationRequest |
Occurs when an authentication request is received from the server that cannot be answered programmatically.
| |
| BannerReceived |
Occurs when a banner message is received from the server.
| |
| FingerprintCheck |
Occurs when a fingerprint is received from the server and needs to be validated.
| |
| ForwardingRequest |
Occurs when an incoming tunnel request has arrived.
|