Discuss this help topic in SecureBlackbox Forum

SFTP: Initiate SFTP connection

To initiate the SFTP connection using simple SFTP, you need to use TElSimpleSFTPClient component. This component can use built-in socket mechanisms, and alternatively it lets you provide your own data transport.

TElSimpleSFTPClient incapsulates SSH protocol and all supplementary objects.

First of all you need to create an instance of TElSimpleSFTPClient class.

If you use built-in sockets, you need to set Address and Port properties of TElSimpleSFTPClient class to the address and port of the remote server. Also you need to set UseInternalSocket property of TElSimpleSFTPClient class to true.

You must handle the OnKeyValidate event in order to validate the server key.

The final step is to call Open() method of TElSimpleSFTPClient class. This method is synchronous and returns when the connection is established. If the connection could not be established, the exception happens.

How To articles about SFTP client

Discuss this help topic in SecureBlackbox Forum