SFTP Bean
Properties Methods Events Configuration Settings Errors
The SFTP component can be used to transfer files to and from SFTP servers using the SFTP Protocol.
Syntax
InEDI.Sftp
Remarks
The SFTP bean is the SSH-enabled equivalent of the IP*Works! FTP bean. 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 bean implements a standard SSH File Transfer client.
The first step in using the bean 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 bean with short descriptions. Click on the links for further details.
Connected | Triggers a connection or disconnection. |
DirList | Collection of entries resulting in the last directory listing. |
FileAttributes | The attributes of the RemoteFile . |
FileExists | Returns true if the file specified by RemoteFile exists on the remote server. |
Firewall | A set of properties related to firewall access. |
Idle | The current status of the component. |
LocalFile | The path to a local file for upload/download. |
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 IPPort binds. |
Overwrite | Whether or not the component should overwrite files during transfer. |
RemoteFile | The name of the remote file for uploading, downloading, etc. |
RemotePath | The current path in the SFTP server. |
SSHAcceptServerHostKey | Instructs the component to accept the server host key that matches the supplied key. |
SSHAuthMode | The authentication method to be used the component when calling SSHLogon . |
SSHCert | A certificate to be used for authenticating the SSHUser . |
SSHCompressionAlgorithms | A comma-separated list containing all allowable compression algorithms. |
SSHEncryptionAlgorithms | A comma-separated list containing all allowable compression algorithms. |
SSHHost | The address of the SSH host. |
SSHPassword | The password for SSH password-based authentication. |
SSHPort | The port on the SSH server where the SSH service is running; by default, 22. |
SSHUser | The username for SSH authentication. |
StartByte | The offset in bytes at which to begin the Upload or Download. |
Timeout | A timeout for the component. |
Method List
The following is the full list of the methods of the bean with short descriptions. Click on the links for further details.
append | Append data from LocalFile to a remote file RemoteFile on an SFTP server. |
config | Sets or retrieves a configuration setting . |
decodePacket | Decodes a hex-encoded SSH packet. |
deleteFile | Remove a file specified by FileName from an SFTP server. |
doEvents | Processes events from the internal message queue. |
download | Download a RemoteFile from an SFTP server. |
encodePacket | Hex encodes an SSH packet. |
getSSHParam | Used to read a field from an SSH packet's payload. |
getSSHParamBytes | Used to read a field from an SSH packet's payload. |
interrupt | Interrupt the current method. |
listDirectory | List the current directory specified by RemotePath on an SFTP server. |
makeDirectory | Create a directory on an SFTP server. |
queueFile | Adds a file to the transfer queue. |
removeDirectory | Remove a directory specified by DirName from an SFTP server. |
renameFile | Change the name of RemoteFile to NewName . |
reset | Reset the component. |
resetQueue | Resets the queue of files to be transferred. |
setDownloadStream | Sets the stream to which the downloaded data from the server will be written. |
setSSHParam | Used to write a field to the end of a payload. |
setUploadStream | Sets the stream from which the component will read data to upload to the server. |
SSHLogoff | Logoff from the SSH server. |
SSHLogon | Logon to the SSHHost using the current SSHUser and SSHPassword . |
updateFileAttributes | Instructs the component to send the FileAttributes to the server. |
upload | Upload a file specified by LocalFile to an SFTP 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). |
ConnectionStatus | Fired to indicate changes in connection state. |
DirList | Fired when a directory entry is received. |
Disconnected | Fired when a connection is closed. |
EndTransfer | Fired when a file completes downloading/uploading. |
Error | Information about errors during data delivery. |
SSHCustomAuth | Fired when the component is doing custom authentication. |
SSHKeyboardInteractive | Fired when the component receives a request for user input from the server. |
SSHServerAuthentication | Fired after the server presents its public key to the client. |
SSHStatus | Shows the progress of the secure connection. |
StartTransfer | Fired when a file starts downloading/uploading. |
Transfer | Fired during file download/upload. |
Configuration Settings
The following is a list of configuration settings for the bean with short descriptions. Click on the links for further details.
AllowBackslashInName | Whether backslashes are allowed in folder and file names. |
DisableRealPath | Controls whether or not the SSH_FXP_REALPATH request is sent. |
FiletimeFormat | Specifies the format to use when returning filetime strings. |
FileMaskDelimiter | Specifies a delimiter to use for setting multiple file masks in the RemoteFile property. |
IgnoreFileMaskCasing | Controls whether or not the file mask is case sensitive. |
LocalEOL | When TransferMode is set, this specifies the line ending for the local system. |
ServerEOL | When TransferMode is set, this specifies the line ending for the remote system. |
MaskSensitive | Masks passwords in logs. |
MaxFileData | Specifies the maximum payload size of an SFTP packet. |
ProtocolVersion | The highest allowable SFTP version to use. |
PreserveFileTime | Preserves the file's timestamps during transfer. |
TransferMode | The transfer mode (ASCII or Binary). |
ReadLink | This settings returns the target of a specified symbolic link. |
RealPathControlFlag | Specifies the control-byte field sent in the SSH_FXP_REALPATH request. |
RealTimeUpload | Enables real time uploading. |
RealTimeUploadAgeLimit | The age limit in seconds when using RealTimeUpload. |
SimultaneousTransferLimit | The maximum number of simultaneous file transfers. |
TransferredDataLimit | Specifies the maximum number of bytes to download from the remote file. |
ClientSSHVersionString | The SSH version string used by the component. |
SSHVersionPattern | The pattern used to match the remote host's version string. |
SSHFingerprintHashAlgorithm | The algorithm used to calculate the fingerprint. |
SignedSSHCert | The CA signed client public key used when authenticating. |
SSHAcceptServerCAKey | The CA public key that signed the server's host key. |
SSHAcceptAnyServerHostKey | If set the component will accept any key presented by the server. |
SSHAcceptServerHostKeyFingerPrint | The fingerprint of the server key to accept. |
SSHKeyExchangeAlgorithms | Specifies the supported key exchange algorithms. |
SSHMacAlgorithms | Specifies the supported Mac algorithms. |
SSHPublicKeyAlgorithms | Specifies the supported public key algorithms. |
SSHKeepAliveInterval | The interval between keep alive packets. |
SSHKeepAliveCountMax | The maximum number of keep alive packets to send without a response. |
SSHKeyRenegotiate | Causes the component to renegotiate the SSH keys. |
KeyRenegotiationThreshold | Sets the threshold for the SSH Key Renegotiation. |
SSHPubKeyAuthSigAlgorithms | Specifies the signature algorithm when attempting public key authentication. |
KerberosRealm | The fully qualified domain name of the Kerberos Realm to use for GSSAPI authentication. |
KerberosDelegation | If true, asks for credentials with delegation enabled during authentication. |
KerberosSPN | The Kerberos Service Principal Name of the SSH host. |
LogSSHPackets | If true, detailed SSH packet logging is performed. |
MaxPacketSize | The maximum packet size of the channel, in bytes. |
MaxWindowSize | The maximum window size allowed for the channel, in bytes. |
PasswordPrompt | The text of the password prompt used in keyboard-interactive authentication. |
PreferredDHGroupBits | The size (in bits) of the preferred modulus (p) to request from the server. |
RecordLength | The length of received data records. |
GUIAvailable | Tells the component whether or not a message loop is available for processing events. |
UseDaemonThreads | Whether threads created by the component are daemon threads. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |