SFTPServer Class
Properties Methods Events Configuration Settings Errors
The SFTPServer class provides server-side functionality for SFTP connections.
Syntax
secureblackbox.sftpserver()
Remarks
TElSFTPServer is an implementation for SSH File Transfer Protocol server. It works over a secure SSH channel, and should not be confused with the FTP/FTPS protocol.
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
Active | Specifies whether the SFTP server has started and ready to accept connections. |
AuthTypes | Defines allowed authentication types. |
BaseDir | Specifies the server's base (root) directory. |
ClientFileEntryATime | Contains the last access time for this file, in UTC. |
ClientFileEntryCTime | Contains this file's creation time, in UTC. |
ClientFileEntryDirectory | Specifies whether this entry is a directory. |
ClientFileEntryFileType | Specifies the type of this entry, one of the following: cftFile 0 cftDirectory 1 cftSymblink 2 cftSpecial 3 cftUnknown 4 cftSocket 5 cftCharDevice 6 cftBlockDevice 7 cftFIFO 8 . |
ClientFileEntryGroupExecute | Controls file execution permission for the group users. |
ClientFileEntryGroupRead | Controls file read permission for the group users. |
ClientFileEntryGroupWrite | Controls file write permission for the group users. |
ClientFileEntryHandle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
ClientFileEntryLongName | Contains the long name of the file (human-readable, ftp-like). |
ClientFileEntryMTime | Specifies the last modification time, in UTC. |
ClientFileEntryName | Specifies the file name. |
ClientFileEntryOtherExecute | Controls file execution permission for other users (users that are neither owners, nor belong to the same group). |
ClientFileEntryOtherRead | Controls file read permission for other users (users that are neither owners, nor belong to the same group). |
ClientFileEntryOtherWrite | Controls file write permission for other users (users that are neither owners, nor belong to the same group). |
ClientFileEntryOwner | Specifies the owner of the file/directory. |
ClientFileEntryPath | Contains the full path to the file. |
ClientFileEntrySize | The size of the file in bytes. |
ClientFileEntryUserExecute | Controls file execution permission for the file owner. |
ClientFileEntryUserRead | Controls file read permission for the file owner. |
ClientFileEntryUserWrite | Controls file write permission for the file owner. |
CompressionLevel | Specifies the preferable compression level. |
ExternalCryptoCustomParams | Custom parameters to be passed to the signing service (uninterpreted). |
ExternalCryptoData | Additional data to be included in the async state and mirrored back by the requestor. |
ExternalCryptoExternalHashCalculation | Specifies whether the message hash is to be calculated at the external endpoint. |
ExternalCryptoHashAlgorithm | Specifies the request's signature hash algorithm. |
ExternalCryptoKeyID | The ID of the pre-shared key used for DC request authentication. |
ExternalCryptoKeySecret | The pre-shared key used for DC request authentication. |
ExternalCryptoMethod | Specifies the asynchronous signing method. |
ExternalCryptoMode | Specifies the external cryptography mode. |
ExternalCryptoPublicKeyAlgorithm | Provide public key algorithm here if the certificate is not available on the pre-signing stage. |
ForceCompression | This property specifies whether server explicitly requires data compression. |
Host | Specifies server's host name. |
KeyFingerprintSHA1 | Contains the SHA-1 fingerprint (hash) of the key. |
KeyFingerprintSHA256 | Contains the SHA-256 fingerprint (hash) of the key. |
KeyHandle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
MaxSFTPVersion | Maximum SFTP version supported. |
MinSFTPVersion | Minimum SFTP version supported. |
PinnedClientAddress | The client's IP address. |
PinnedClientClientKeyAlgorithm | Specifies the client's key algorithm. |
PinnedClientClientKeyBits | Specifies the length of the client's key. |
PinnedClientClientKeyFingerprint | The fingerprint (hash value) of the client's public key. |
PinnedClientClientSoftwareName | Returns the name of the SSH software running on the client side. |
PinnedClientCloseReason | Contains the line sent by the client just before closing the connection. |
PinnedClientCompressionAlgorithmInbound | Compression algorithm for the incoming traffic. |
PinnedClientCompressionAlgorithmOutbound | Compression algorithm for the outgoing traffic. |
PinnedClientEncryptionAlgorithmInbound | Encryption algorithm for the incoming traffic. |
PinnedClientEncryptionAlgorithmOutbound | Encryption algorithm for the outgoing traffic. |
PinnedClientID | The client connection's unique identifier. |
PinnedClientInboundEncryptionKeyBits | Specifies the length of the key used to encrypt the incoming traffic. |
PinnedClientKexAlgorithm | The key exchange algorithm used during the SSH handshake. |
PinnedClientKexBits | The number of bits used by the key exchange algorithm. |
PinnedClientKexLines | The contents of the received KexInit packet. |
PinnedClientMacAlgorithmInbound | MAC algorithm used for the incoming connection. |
PinnedClientMacAlgorithmOutbound | MAC algorithm used for outbound connection. |
PinnedClientOutboundEncryptionKeyBits | Specifies the length of the key used to encrypt the outgoing traffic. |
PinnedClientPort | The remote port of the client connection. |
PinnedClientPublicKeyAlgorithm | Specifies the public key algorithm which was used during the SSH handshake. |
PinnedClientServerKeyBits | Specifies the number of bits in the server's key. |
PinnedClientServerKeyFingerprint | The fingerprint (hash value) of the server's public key. |
PinnedClientTotalBytesReceived | Returns the total number of bytes received over this connection. |
PinnedClientTotalBytesSent | Returns the total number of bytes sent over this connection. |
PinnedClientVersion | Specifies SSH protocol version. |
Port | Specifies the listening port number. |
ReadOnly | Specifies whether files on the server are read-only. |
ServerKeyCount | The number of records in the ServerKey arrays. |
ServerKeyAlgorithm | Specifies the key algorithm. |
ServerKeyBits | The number of bits in the key: the more the better, 2048 or 4096 are typical values. |
ServerKeyFingerprintMD5 | Contains the MD5 fingerprint (hash) of the key. |
ServerKeyFingerprintSHA1 | Contains the SHA-1 fingerprint (hash) of the key. |
ServerKeyHandle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
SocketIncomingSpeedLimit | The maximum number of bytes to read from the socket, per second. |
SocketLocalAddress | The local network interface to bind the socket to. |
SocketLocalPort | The local port number to bind the socket to. |
SocketOutgoingSpeedLimit | The maximum number of bytes to write to the socket, per second. |
SocketTimeout | The maximum period of waiting, in milliseconds, after which the socket operation is considered unsuccessful. |
SocketUseIPv6 | Enables or disables IP protocol version 6. |
SSHSettingsAutoAdjustCiphers | Whether the SSH client should adjust its list of supported ciphers 'on-the-fly' for greater compatibility with the server it is connecting to. |
SSHSettingsBaseConfiguration | Allows to choose base configuration of SSH settings, tuned up for different purposes such as high security or higher compatibility. |
SSHSettingsCompressionAlgorithms | A list of session compression algorithms separated with commas or semicolons. |
SSHSettingsCompressionLevel | Possible values for the Compression Level range from 0 (minimum compression) to 9 (maximum compression). |
SSHSettingsDefaultWindowSize | The SSH window size specifies how many bytes the client can send to the server in the command channel without obtaining pre-authorization for the further send from the server. |
SSHSettingsEncryptionAlgorithms | A list of session encryption algorithms separated with commas or semicolons. |
SSHSettingsForceCompression | Whether the SSH client should explicitly request compression. |
SSHSettingsGSSAuthTypes | A comma-separated list of authentication types. |
SSHSettingsGSSDelegateCreds | Switches credential delegation on or off. |
SSHSettingsGSSHostname | The GSS host name, in form of a FQDN (e. |
SSHSettingsGSSLib | A path to the GSS-API library (DLL or SO). |
SSHSettingsGSSMechanisms | A comma-separated list of GSS mechanisms to use. |
SSHSettingsGSSProtocols | A comma-separated list of SSPI protocols. |
SSHSettingsHandshakeTimeout | Specifies the maximal time for the SSH handshake to proceed, in seconds. |
SSHSettingsKexAlgorithms | A list of key exchange algorithms separated with commas or semicolons. |
SSHSettingsMacAlgorithms | A list of MAC (for message authentication code ) algorithms separated with commas or semicolons. |
SSHSettingsMaxSSHPacketSize | Specifies the maximum length of one SSH packet in bytes. |
SSHSettingsMinWindowSize | Specifies the minimal internal window size. |
SSHSettingsObfuscateHandshake | Enables or disables handshake obfuscation. |
SSHSettingsObfuscationPassword | Specifies the password used to encrypt the handshake when ObfuscateHandshake is set. |
SSHSettingsPublicKeyAlgorithms | A list of public key algorithms separated with commas or semicolons. |
SSHSettingsRequestPasswordChange | Whether to request a password change when connecting. |
SSHSettingsSoftwareName | The name to be used by the class to identify itself. |
SSHSettingsTrustAllKeys | Enables or disables explicit trust to all server keys. |
SSHSettingsUseAuthAgent | Enables or disables the use of external key agent, such as Putty key agent. |
SSHSettingsVersions | Specifies enabled SSH protocol versions (1 or 2). |
UserCount | The number of records in the User arrays. |
UserAssociatedData | Contains the user's Associated Data when SSH AEAD (Authenticated Encryption with Associated Data) algorithm is used. |
UserBasePath | Base path for this user in the server's file system. |
UserCert | Contains the user's certificate. |
UserData | Contains uninterpreted user-defined data that should be associated with the user account, such as comments or custom settings. |
UserHandle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
UserHashAlgorithm | Specifies the hash algorithm used to generate TOTP (Time-based One-Time Passwords) passwords for this user. |
UserIncomingSpeedLimit | Specifies the incoming speed limit for this user. |
UserOtpAlgorithm | The algorithm used to generate one-time passwords (OTP) for this user, either HOTP (Hash-based OTP) or TOTP (Time-based OTP). |
UserOtpValue | The user's time interval (TOTP) or Counter (HOTP). |
UserOutgoingSpeedLimit | Specifies the outgoing speed limit for this user. |
UserPassword | The user's authentication password. |
UserPasswordLen | Specifies the length of the user's OTP password. |
UserSharedSecret | Contains the user's secret key, which is essentially a shared secret between the client and server. |
UserSSHKey | Contains the user's SSH key. |
UserUsername | The registered name (login) of the user. |
UseUTF8 | Specifies whether UTF8 conversion is to be used when parsing file names. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting. |
DropClient | Terminates a client connection. |
GetClientBuffer | Acquires a piece of operation data. |
GetClientFileEntry | Acquires file entry details from the class. |
ListClients | Enumerates the connected clients. |
PinClient | Takes a snapshot of the connection's properties. |
SetClientBuffer | Commits a data buffer to the server class. |
SetClientFileEntry | Commits the file entry details to the class. |
Start | Starts SFTP server operation. |
Stop | Stops SFTP server. |
Event List
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
Accept | This event is fired when new incoming connection is accepted. |
AfterCreateDirectory | This event indicates completion of directory creation request. |
AfterRemove | This event indicates completion of file removal request. |
AfterRenameFile | This event indicates completion of a file rename operation. |
AfterRequestAttributes | This event indicates completion of file attributes request. |
AfterSetAttributes | This event indicates completion of a set attributes request. |
AuthAttempt | Reports a user authentication attempt. |
AuthFailed | Reports user authentication failure. |
AuthPassword | This event is fired on password authentication attempt from a client. |
AuthPublicKey | This event is fired on public key authentication attempt from a client. |
AuthSucceeded | Reports a successful user authentication. |
BeforeCreateDirectory | This event is fired when a client requests to create a directory. |
BeforeDownloadFile | This event is fired when a download file request is received. |
BeforeFind | This event is fired when a client requests to find files and folders in Path. |
BeforeRemove | This event is fired when a client requests to delete a file or directory. |
BeforeRenameFile | This event is fired when a client requests to rename a file. |
BeforeRequestAttributes | This event is fired when a client requests to get file attributes. |
BeforeSetAttributes | This event is fired when a client requests to set file attributes. |
BeforeUploadFile | This event is fired when an upload file request is received. |
CloseFile | This event instructs the application to close an opened file. |
Connect | This event is fired when a remote connection has been established. |
CreateDirectory | This event instructs the application to create a directory. |
Disconnect | This event is fired when a client has disconnected. |
Error | Information about errors during data delivery. |
ExternalSign | Handles remote or external signing initiated by the server protocol. |
FindClose | This event signifies the completion of a custom file listing operation. |
FindFirst | This event signifies the start of the custom file listing retrieval mechanism. |
FindNext | This event retrieves the next entry of a custom file listing. |
Notification | This event notifies the application about an underlying control flow event. |
OpenFile | This event instructs the application to handle the file open request. |
ReadFile | This event is fired when a file read request is received. |
Remove | This event is fired when a client requests to delete a file or directory. |
RenameFile | This event is fired when a client requests to rename a file. |
RequestAttributes | This event is fired when a get file attributes request is received. |
SessionClosed | Reports session closure. |
SessionEstablished | This event is fired when a new session is established. |
SetAttributes | This event is fired when an set file attributes request is received. |
WriteFile | This event is fired when a file write request is received. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
AuthMode | Controls dual/multi-type authentication mode. |
CustomDHGroupIndex | Sets a specific Diffie-Hellman group index to enforce. |
DualStack | Allows the use of ip4 and ip6 simultaneously. |
MaxDHGroupSize | Sets the maximal Diffie-Hellman group size. |
MinDHGroupSize | Sets the minimal Diffie-Hellman group size. |
NotifyOnFileOperations | Enables low-level file operation notifications. |
CheckKeyIntegrityBeforeUse | Enables or disable private key integrity check before use. |
CookieCaching | Specifies whether a cookie cache should be used for HTTP(S) transports. |
Cookies | Gets or sets local cookies for the class (supported for HTTPClient, RESTClient and SOAPClient only). |
DefDeriveKeyIterations | Specifies the default key derivation algorithm iteration count. |
EnableClientSideSSLFFDHE | Enables or disables finite field DHE key exchange support in TLS clients. |
GlobalCookies | Gets or sets global cookies for all the HTTP transports. |
HttpUserAgent | Specifies the user agent name to be used by all HTTP clients. |
LogDestination | Specifies the debug log destination. |
LogDetails | Specifies the debug log details to dump. |
LogFile | Specifies the debug log filename. |
LogFilters | Specifies the debug log filters. |
LogFlushMode | Specifies the log flush mode. |
LogLevel | Specifies the debug log level. |
LogMaxEventCount | Specifies the maximum number of events to cache before further action is taken. |
LogRotationMode | Specifies the log rotation mode. |
MaxASN1BufferLength | Specifies the maximal allowed length for ASN.1 primitive tag data. |
MaxASN1TreeDepth | Specifies the maximal depth for processed ASN.1 trees. |
OCSPHashAlgorithm | Specifies the hash algorithm to be used to identify certificates in OCSP requests. |
UseOwnDNSResolver | Specifies whether the client classes should use own DNS resolver. |
UseSharedSystemStorages | Specifies whether the validation engine should use a global per-process copy of the system certificate stores. |
UseSystemOAEPAndPSS | Enforces or disables the use of system-driven RSA OAEP and PSS computations. |
UseSystemRandom | Enables or disables the use of the OS PRNG. |