IPWorks SSH 2020 ActiveX Edition

Questions / Feedback?

SFTP Control

Properties   Methods   Events   Configuration Settings   Errors  

The SFTP control can be used to transfer files to and from SFTP servers using the SFTP Protocol.

Syntax

SFTP

Remarks

The SFTP control is the SSH-enabled equivalent of the IPWorks FTP control. The SSHHost and SSHPort properties specify the SSH server to use. The SSHUser and SSHPassword properties allow the client to authenticate itself with the server. The SSHServerAuthentication event and/or SSHAcceptServerHostKey property allow you to check the server identity. Finally, the SSHStatus event provides information about the SSH handshake.

The SFTP control implements a standard SSH File Transfer client.

The first step in using the control is specifying the SSHHost, SSHUser and SSHPassword. The file to upload to or download from is given by the RemoteFile property. The file to download to or upload from is specified by LocalFile. The current path in the server is specified by the RemotePath property.

If LocalFile is set to something other than an empty string, then files are received in LocalFile, otherwise the data is received through the Transfer event. StartTransfer and EndTransfer are fired at the beginning and end of transmission.

Directory listings are received through the DirList event.

Property List


The following is the full list of the properties of the control with short descriptions. Click on the links for further details.

ConnectedTriggers a connection or disconnection.
DirListCountThe number of records in the DirList arrays.
DirListEntryThis property contains the raw entry as received from the server.
DirListFileNameThis property shows the file name in the last directory listing.
DirListFileSizeThis property shows the file size in the last directory listing.
DirListFileTimeThis property shows the file time in the last directory listing.
DirListIsDirThis property specifies whether entries in the last directory listing are directories.
DirListIsSymlinkThis property indicates whether the entry is a symbolic link.
FileAccessTimeThe number of milliseconds since 12:00:00 AM January 1, 1970 when this file was last accessed.
FileACLA string containing an Access Control List (ACL).
FileAllocationSizeThe size, in bytes, that this file consumes on disk.
FileAttributeBitsAttributeBits and AttributeBitsValid each contain a bitmask representing attributes of the file on the SFTP server.
FileAttributeBitsValidAttributeBits and AttributeBitsValid each contain a bitmask representing attributes of the file on the SFTP server.
FileCreationTimeThe number of milliseconds since 12:00:00 AM January 1, 1970 when this file was created.
FileTypeThe type of file.
FileGroupIdThe id of the group that has access rights this file.
FileIsDirWhether or not the file represented by these attributes is a directory.
FileIsSymlinkWhether or not the file or directory represented by these attributes is a symbolic link.
FileModifiedTimeThe number of milliseconds since 12:00:00 AM January 1, 1970 that this file was last modified.
FileOwnerIdThe user id of this file's owner.
FilePermissionsA 32-bit integer containing the a POSIX-compatible file permission bitmask.
FilePermissionsOctalAn octal string containing the a POSIX-compatible file permission bitmask The bitmask should be interpreted as a series of octal digits.
FileSizeThe total size, in bytes, of this file.
FileExistsReturns true if the file specified by RemoteFile exists on the remote server.
FirewallAutoDetectThis property tells the control whether or not to automatically detect and use firewall system settings, if available.
FirewallTypeThis property determines the type of firewall to connect through.
FirewallHostThis property contains the name or IP address of firewall (optional).
FirewallPasswordThis property contains a password if authentication is to be used when connecting through the firewall.
FirewallPortThis property contains the TCP port for the firewall Host .
FirewallUserThis property contains a user name if authentication is to be used connecting through a firewall.
IdleThe current status of the control.
LocalFileThe path to a local file for upload/download.
LocalHostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
LocalPortThe TCP port in the local host where the control binds.
OverwriteWhether or not the control should overwrite files during transfer.
RemoteFileThe name of the remote file for uploading, downloading, etc.
RemotePathThe current path in the SFTP server.
SSHAcceptServerHostKeyEncodedThe certificate (PEM/base64 encoded).
SSHAuthModeThe authentication method to be used the control when calling SSHLogon .
SSHCertEncodedThe certificate (PEM/base64 encoded).
SSHCertStoreThe name of the certificate store for the client certificate.
SSHCertStorePasswordIf the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store.
SSHCertStoreTypeThe type of certificate store for this certificate.
SSHCertSubjectThe subject of the certificate used for client authentication.
SSHCompressionAlgorithmsA comma-separated list containing all allowable compression algorithms.
SSHEncryptionAlgorithmsA comma-separated list containing all allowable encryption algorithms.
SSHHostThe address of the SSH host.
SSHPasswordThe password for SSH password-based authentication.
SSHPortThe port on the SSH server where the SSH service is running; by default, 22.
SSHUserThe username for SSH authentication.
StartByteThe offset in bytes at which to begin the Upload or Download.
TimeoutA timeout for the control.

Method List


The following is the full list of the methods of the control with short descriptions. Click on the links for further details.

AppendAppend data from LocalFile to a remote file RemoteFile on an SFTP server.
ConfigSets or retrieves a configuration setting.
CreateFileCreates a file on the SFTP server.
DecodePacketDecodes a hex-encoded SSH packet.
DeleteFileRemove a file specified by FileName from an SFTP server.
DoEventsProcesses events from the internal message queue.
DownloadDownload a RemoteFile from an SFTP server.
EncodePacketHex encodes an SSH packet.
GetSSHParamUsed to read a field from an SSH packet's payload.
GetSSHParamBytesUsed to read a field from an SSH packet's payload.
InterruptInterrupt the current method.
ListDirectoryList the current directory specified by RemotePath on an SFTP server.
MakeDirectoryCreate a directory on an SFTP server.
QueueFileAdds a file to the transfer queue.
RemoveDirectoryRemove a directory specified by DirName from an SFTP server.
RenameFileChange the name of RemoteFile to NewName .
ResetReset the control.
ResetQueueResets the queue of files to be transferred.
SetSSHParamUsed to write a field to the end of a payload.
SSHLogoffLogoff from the SSH server.
SSHLogonLogon to the SSHHost using the current SSHUser and SSHPassword .
UpdateFileAttributesInstructs the control to send the FileAttributes to the server.
UploadUpload a file specified by LocalFile to an SFTP server.

Event List


The following is the full list of the events fired by the control with short descriptions. Click on the links for further details.

ConnectedFired immediately after a connection completes (or fails).
ConnectionStatusFired to indicate changes in connection state.
DirListFired when a directory entry is received.
DisconnectedFired when a connection is closed.
EndTransferFired when a file completes downloading/uploading.
ErrorInformation about errors during data delivery.
LogFires once for each log message.
SSHCustomAuthFired when the control is doing custom authentication.
SSHKeyboardInteractiveFired when the control receives a request for user input from the server.
SSHServerAuthenticationFired after the server presents its public key to the client.
SSHStatusShows the progress of the secure connection.
StartTransferFired when a file starts downloading/uploading.
TransferFired during file download/upload.

Configuration Settings


The following is a list of configuration settings for the control with short descriptions. Click on the links for further details.

AllowBackslashInNameWhether backslashes are allowed in folder and file names.
AsyncTransferControls whether simultatenous requests are made to read or write files.
AttrAccessTimeCan be queried for the AccessTime file attribute during the DirList event.
AttrCreationTimeCan be queried for the CreationTime file attribute during the DirList event.
AttrFileTypeCan be queried for the FileType file attribute during the DirList event.
AttrGroupIdCan be queried for the GroupId file attribute during the DirList event.
AttrLinkCountCan be queried for the LinkCount file attribute during the DirList event.
AttrOwnerIdCan be queried for the OwnerId file attribute during the DirList event.
AttrPermissionCan be queried for the Permissions file attribute during the DirList event.
CheckFileHashCompares a server-computed hash with a hash calculated locally.
DisableRealPathControls whether or not the SSH_FXP_REALPATH request is sent.
ExcludeFileMaskSpecifies a file mask for excluding files in directory listings.
FileMaskDelimiterSpecifies a delimiter to use for setting multiple file masks in the RemoteFile property.
FiletimeFormatSpecifies the format to use when returning filetime strings.
FreeSpaceThe free space on the remote server in bytes.
GetSpaceInfoQueries the server for drive usage information.
GetSymlinkAttrsWhether to get the attributes of the symbolic link, or the resource pointed to by the link.
IgnoreFileMaskCasingControls whether or not the file mask is case sensitive.
LocalEOLWhen TransferMode is set, this specifies the line ending for the local system.
LogSFTPFileDataWhether SFTP file data is present in Debug logs.
MaskSensitiveMasks passwords in logs.
MaxFileDataSpecifies the maximum payload size of an SFTP packet.
MaxOutstandingPacketsSets the maximum number of simultaneous read or write requests allowed.
NegotiatedProtocolVersionThe negotiated SFTP version.
NormalizeRemotePathWhether to normalize the RemotePath.
PreserveFileTimePreserves the file's timestamps during transfer.
ProtocolVersionThe highest allowable SFTP version to use.
ReadLinkThis settings returns the target of a specified symbolic link.
RealTimeUploadEnables real time uploading.
RealTimeUploadAgeLimitThe age limit in seconds when using RealTimeUpload.
ServerEOLWhen TransferMode is set, this specifies the line ending for the remote system.
SimultaneousTransferLimitThe maximum number of simultaneous file transfers.
TotalSpaceThe total space on the remote server in bytes.
TransferModeThe transfer mode (ASCII or Binary).
TransferredDataLimitSpecifies the maximum number of bytes to download from the remote file.
UseFxpStatWhether SSH_FXP_STAT is sent.
UseServerFileTimeControls if the file time returned from the server is converted to local time or not.
ClientSSHVersionStringThe SSH version string used by the control.
EnablePageantAuthWhether to use a key stored in Pageant to perform client authentication.
KerberosDelegationIf true, asks for credentials with delegation enabled during authentication.
KerberosRealmThe fully qualified domain name of the Kerberos Realm to use for GSSAPI authentication.
KerberosSPNThe Kerberos Service Principal Name of the SSH host.
KeyRenegotiationThresholdSets the threshold for the SSH Key Renegotiation.
LogLevelSpecifies the level of detail that is logged.
MaxPacketSizeThe maximum packet size of the channel, in bytes.
MaxWindowSizeThe maximum window size allowed for the channel, in bytes.
PasswordPromptThe text of the password prompt used in keyboard-interactive authentication.
PreferredDHGroupBitsThe size (in bits) of the preferred modulus (p) to request from the server.
RecordLengthThe length of received data records.
ServerSSHVersionStringThe remote host's SSH version string.
SignedSSHCertThe CA signed client public key used when authenticating.
SSHAcceptAnyServerHostKeyIf set the control will accept any key presented by the server.
SSHAcceptServerCAKeyThe CA public key that signed the server's host key.
SSHAcceptServerHostKeyFingerPrintThe fingerprint of the server key to accept.
SSHFingerprintHashAlgorithmThe algorithm used to calculate the fingerprint.
SSHFingerprintMD5The server hostkey's MD5 fingerprint.
SSHFingerprintSHA1The server hostkey's SHA1 fingerprint.
SSHFingerprintSHA256The server hostkey's SHA256 fingerprint.
SSHKeepAliveCountMaxThe maximum number of keep alive packets to send without a response.
SSHKeepAliveIntervalThe interval between keep alive packets.
SSHKeyExchangeAlgorithmsSpecifies the supported key exchange algorithms.
SSHKeyRenegotiateCauses the control to renegotiate the SSH keys.
SSHMacAlgorithmsSpecifies the supported Mac algorithms.
SSHPubKeyAuthSigAlgorithmsSpecifies the enabled signature algorithms that may be used when attempting public key authentication.
SSHPublicKeyAlgorithmsSpecifies the supported public key algorithms.
SSHVersionPatternThe pattern used to match the remote host's version string.
TryAllAvailableAuthMethodsIf set to true, the control will try all available authentication methods.
WaitForChannelCloseWhether to wait for channels to be closed before disconnected.
WaitForServerDisconnectWhether to wait for the server to close the connection.
ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the control whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
LingerWhen set to True, connections are terminated gracefully.
LingerTimeTime in seconds to have the connection linger.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the control binds.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
MaxTransferRateThe transfer rate limit in bytes per second.
ProxyExceptionsListA semicolon separated list of hosts and IPs to bypass when using a proxy.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
TcpNoDelayWhether or not to delay when sending packets.
UseIPv6Whether to use IPv6.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
CodePageThe system code page used for Unicode to Multibyte translations.
UseInternalSecurityAPITells the control whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2023 /n software inc. - All rights reserved.
IPWorks SSH 2020 ActiveX Edition - Version 20.0 [Build 8501]