wodSFTP API library - RemoteIdentification Property
      
 

Description

Holds the remote identification string


Return type

A Long value. If successful, 0 is returned, otherwise error as specified here


Syntax

long Sftp_GetRemoteIdentification(void *Sftp, char *Buffer, int *Bufsize);

The RemoteIdentification function syntax has these parts:

Part Description
void *Sftp Handle of the created Sftp instance.
char *Buffer Buffer that will hold the returned string.
int *Bufsize Size of the buffer.

Remarks

Once an initial connection is established with the server, the SSH protocol specifies that both parties should exchange version information. This information includes the server/client type, and the version supported. Typically, this would be something like

SSH-1.99-OpenSSH_2.9p2

which means that server supports the SSH protocol versions SSH1 and SSH2, and the server type is OpenSSH running version 2.9p2. Other values can apply here, too. The first part of the string is the important part,

SSH-1.99

1.99 means that the server supports both SSH1 and SSH2 protocols. If only SSH1 is supported, then server would usually reply with SSH-1.5, and if only SSH2 is supported it would usually reply with SSH-2.0.

wodSFTP can work only with SSH2 servers! This is due to the SFTP protocol specification, not to our implementation.

The Bufsize variable should contain the maximum data length that can be stored in the Buffer variable. If you set Bufsize = 0, then the function will return with error ERROR_INSUFFICIENT_BUFFER and Bufsize will contain the required buffer size.