Sftpserver Configuration
The bean accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the bean, access to these internal properties is provided through the Config method.SFTPServer Configuration Settings
DirListBufferSize[ConnectionId]: The number of entries to be returned in one response to a request for a directory listing.The default value for this configuration setting is 1, which means that the bean will return one entry at a time in response to a request for a directory listing. Changing this value will allow the bean to bundle multiple entries into a single response. | |
ProtocolVersion: The highest allowable SFTP version to use.This governs the highest allowable SFTP version to use when negotiating the version with the client. The default value is 3 as this is the most common version. The bean supports values from 3 to 6. | |
RestrictUserToHomeDir[ConnectionId]: Whether to restrict the user to their HomeDir.When True, this setting will restrict the user to the file specified by the "HomeDir" parameter in SSHUserAuthRequest. When False (default), the user will be able to navigate to the root of the server. "ConnectionId" specifies the connection to which the restriction applies. | |
ServerEOL: Specifies the line endings used in files on the server.This setting is used to inform the connecting client what line endings are used in the files on the system. This is only applicable when ProtocolVersion is set to 4 or higher and a connecting client negotiates protocol version 4 or higher. When a client negotiates version 4 or higher this value is reported using the "newline" protocol convention. The client may use that to transform line endings when downloading. The default value is CrLF. | |
SFTPErrorMessage[ConnectionId]: Specifies the error message to be returned to the client.If an SFTP operation would return an error to the client (e.g., permission denied, file does not exist, etc) then this configuration option can be used to specify the error message to be returned to the client. This configuration option is only effective when set within an event that uses the "StatusCode" field. |
SSHDaemon Configuration Settings
MaxAuthAttempts: The maximum authentication attempts allowed before forcing a disconnect.This setting specifies the maximum amount of authentication attempts that will be allowed before forcibly disconnecting the client. | |
ServerSSHVersionString: The SSH version string sent to connecting clients.This setting specifies the version string value that is sent to all connecting clients. This may be set to specify server specific information. The default value is "SSH-2.0-IP*Works! SSH Daemon v9.0". When setting your own value it must begin with "SSH-2.0-" as this is a standard format that specifies the supported SSH version. | |
UserAuthBanner[ConnectionId]: A custom user authentication banner.This setting specifies a custom user authentication banner, which may be sent to give the client more information regarding an authentication attempt. "connectionId" specifies the particular connection to send the message to. This configuration option is only effective when set within the SSHUserAuthRequest event. | |
KeyRenegotiationThreshold: Sets the threshold for the SSH Key Renegotiation.This property allows you to specify the threshold, in the number of bytes, for the SSH Key Renegotiation.
The default value for this property is set to 1 GB.
Example (for setting the threshold to 500 MB): SSHComponent.Config("KeyRenegotiationThreshold=524288000") | |
SSHKeyExchangeAlgorithms: Specifies the supported key exchange algorithms.This may be used to specify the list of supported Key Exchange algorithms used during SSH negotiation. The value should contain
a comma separated list of algorithms. Supported algorithms are:
| |
SSHMacAlgorithms: Specifies the supported Mac algorithms. This may be used to specify an alternate list of supported Mac algorithms used during SSH negotiation. This also specifies the order in which the Mac algorithms are preferred.
The value should contain a comma separated list of algorithms. Supported algorithms are:
|
IPDaemon Configuration Settings
BindExclusively: Whether or not the component considers a local port reserved for exclusive use. If this is true (default), the component will bind to the local port with the ExclusiveAddressUse option set, meaning that nothing else can bind to the same port. Also the component will not be able to bind to local ports that are already in use by some other instance and attempts to do so will result in failure. | |
InBufferSize: The size in bytes of the incoming queue of the socket.
This is the size of an internal queue in the TCP/IP stack.
You can increase or decrease its size depending on the amount
of data that you will be receiving. Increasing the value of the
InBufferSize setting can provide significant improvements in
performance in some cases.
Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the bean is activated the InBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small. InBufferSize is shared among incoming connections. When the property is set, the corresponding value is set for incoming connections as they are accepted. Existing connections are not modified. | |
MaxConnections: The maximum number of connections available. The maximum number of connections available. This property must be set before Listening is set to True, and once set, it can no longer be changed for the current instance of the bean. The maximum value for this setting is 100,000 connections. Use this setting with caution. Extremely large values may impact performance. | |
OutBufferSize: The size in bytes of the outgoing queue of the socket.This is the size of an internal queue in the TCP/IP stack.
You can increase or decrease its size depending on the amount
of data that you will be sending. Increasing the value of the
OutBufferSize setting can provide significant improvements in
performance in some cases.
Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the bean is activated the OutBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small. OutBufferSize is shared among incoming connections. When the property is set, the corresponding value is set for incoming connections as they are accepted. Existing connections are not modified. | |
KeepAliveTime: The inactivity time in milliseconds before a TCP keep-alive packet is sent.By default the operating system will determine the
time a connection is idle before a TCP keep-alive packet is sent. This system default if this value is not specified here is 2 hours. In many
cases a shorter interval is more useful. Set this value to the desired interval in milliseconds.
This setting is applicable to all connections.
Note: This value is not applicable in Java. | |
KeepAliveInterval: The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.A TCP keep-alive packet will be sent after a period of inactivity as
defined by KeepAliveTime. If no acknowledgement is received from the remote host the keep-alive packet
will be re-sent. This setting specifies the interval at which the successive keep-alive packets are sent in milliseconds.
This system default if this value is not specified here is 1 second.
This setting is applicable to all connections.
Note: This value is not applicable in Java or MAC. | |
RecordLength[ConnectionId]: The length of received data records.If set to a positive value, this setting defines the length of data records to be received. The bean will accumulate data
until RecordLength is reached and only then fire the DataIn event with data of length RecordLength.
This allows data to be received as records of known length. This value can be changed at any time, including within the DataIn event.
The default value is 0, meaning this setting is not used. "ConnectionId" specifies the connection to which the setting applies. | |
TcpNoDelay: Whether or not to delay when sending packets.
When true, the socket will send all data that is ready to send at once. When
false, the socket will send smaller buffered packets of data at small intervals.
This is known as the Nagle algorithm.
By default, this config is set to false. | |
CloseStreamAfterTransfer: If true, the component will close the upload or download stream after the transfer.This setting determines whether the input or output stream is closed after the transfer completes. When set to True (default), all streams will be closed after a transfer is completed. In order to keep streams open after the transfer of data, set this to False. the default value is True. |
Base Configuration Settings
GUIAvailable: Tells the bean whether or not a message loop is available for processing events.
In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The bean will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.
In some non-GUI applications an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GuiAvailable to false will ensure that the bean does not attempt to process external events. | |
UseDaemonThreads: Whether threads created by the bean are daemon threads.If set to True, when the bean creates a thread the thread's Daemon property will be explicitly set to True. By default this setting is False and the bean will not set the Daemon property on the created thread. |