SSHDaemon Bean
Properties Methods Events Configuration Settings Errors
The SSHDaemon component is used to create Secure Shell (SSH) servers. The component handles multiple simultaneous connections on the same TCP/IP port (service port). It is designed to balance the load between connections for a fast, powerful server.
Syntax
IPWorksSSH.Sshdaemon
Remarks
The SSHDaemon component is the SSH-enabled equivalent of the IP*Works! IPDaemon component, extended by a set of new properties and events that deal with SSH security. The SSHCompressionAlgorithms and SSHEncryptionAlgorithms properties determine which protocols are enabled for the SSH handshake. The SSHCert property is used to select a certificate for the server (please note that a valid certificate MUST be selected before the server can function). The SSHUserAuthRequest event will allow you to use authenticate clients using digital certificates or passwords. Finally, the SSHStatus event provides information about the SSH handshake and underlying protocol notifications.
By default, each instance of SSHDaemon can handle up to 1000 simultaneous incoming connections (this number may be increased up to 100,000, or decreased to a lower value by using the MaxConnections configuration setting).
SSH connections are identified by a ConnectionId. Events relating to these connections as a whole will use the ConnectionId to identify the specific connection. Connections may also contained one or more multiplexed channels, which are identified by a ChannelId. Channel-level events will specify the ChannelId to which they relate.
SSHDaemon can start to listen on a port by setting the Listening property to True. When a remote host asks for a connection, the ConnectionRequest event is fired. At that point, the connection can either be accepted or rejected. If the connection is accepted, a ConnectionId is assigned, and communication can start. From this point on, the operation is very similar to SSHClient. Data can be sent to an individual SSHChannel using SendChannelData. The address and port of the incoming connection can be found by querying the RemoteHost and RemotePort properties.
Property List
The following is the full list of the properties of the bean with short descriptions. Click on the links for further details.
Channels | A collection of currently open channels. |
ConnectionBacklog | The maximum number of pending connections maintained by the TCP/IP subsystem. |
Connections | A collection of currently connected SSH clients. |
DefaultAuthMethods | Specifies the supported authentication methods. |
DefaultTimeout | An initial timeout value to be used by incoming connections. |
KeyboardInteractiveMessage | The instructions to send to the client during keyboard-interactive authentication. |
KeyboardInteractivePrompts | A collection of prompts to present to the user for keyboard-interactive authentication. |
Listening | If True, the component accepts incoming connections on LocalPort. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
LocalPort | The TCP port in the local host where the component listens. |
SSHCert | A certificate to be used during SSH negotiation. |
SSHCompressionAlgorithms | A comma-separated list containing all allowable compression algorithms. |
SSHEncryptionAlgorithms | A comma-separated list containing all allowable compression algorithms. |
Method List
The following is the full list of the methods of the bean with short descriptions. Click on the links for further details.
closeChannel | Closes a existing SSHChannel . |
config | Sets or retrieves a configuration setting . |
disconnect | Disconnect the specified client. |
doEvents | Processes events from the internal message queue. |
exchangeKeys | Causes the component to exchange a new set of session keys on the specified connection. |
getSSHParam | Used to read a field from an SSH packet's payload. |
getSSHParamBytes | Used to read a field from an SSH packet's payload. |
openChannel | Opens a new SSHChannel . |
sendChannelData | Used to send regular data over an SSH channel. |
sendSSHPacket | Used to send an encoded SSH packet to a connected client. |
setSSHParam | Used to write a field to the end of a payload. |
shutdown | Shuts down the server. |
Event List
The following is the full list of the events fired by the bean with short descriptions. Click on the links for further details.
Connected | Fired immediately after a connection completes (or fails). |
ConnectionRequest | Fired when a request for connection comes from a remote host. |
Disconnected | Fired when a connection is closed. |
Error | Information about errors during data delivery. |
SSHChannelClosed | Fired when a channel is closed. |
SSHChannelDataIn | Fired when data is received on an SSH channel. |
SSHChannelEOF | Fired when the remote peer signals the end of the data stream for the channel. |
SSHChannelOpened | Fired when a channel is successfully opened. |
SSHChannelOpenRequest | Fired when a client attempts to open a new channel. |
SSHChannelRequest | Fired when the SSHHost sends a channel request to the client. |
SSHChannelRequested | Fired if the SSHChannelRequest was successful, any further processing for the channel request should be done here. |
SSHServiceRequest | Fired when a client requests a service to be started. |
SSHStatus | Shows the progress of the secure connection. |
SSHUserAuthRequest | Fires when a client attempts to authenticate a connection. |
Configuration Settings
The following is a list of configuration settings for the bean with short descriptions. Click on the links for further details.
MaxAuthAttempts | The maximum authentication attempts allowed before forcing a disconnect. |
ServerSSHVersionString | The SSH version string sent to connecting clients. |
UserAuthBanner[ConnectionId] | A custom user authentication banner. |
KeyRenegotiationThreshold | Sets the threshold for the SSH Key Renegotiation. |
SSHKeyExchangeAlgorithms | Specifies the supported key exchange algorithms. |
SSHMacAlgorithms | Specifies the supported Mac algorithms. |
BindExclusively | Whether or not the component considers a local port reserved for exclusive use. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
MaxConnections | The maximum number of connections available. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
RecordLength[ConnectionId] | The length of received data records. |
TcpNoDelay | Whether or not to delay when sending packets. |
CodePage | The system code page used for Unicode to Multibyte translations. |