wodSFTP API library - Login Property
      
 

Description

Determines the username/login to be used with the server.


Return type

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


Syntax

long Sftp_GetLogin(void *Sftp, char *Buffer, int *Bufsize);
long Sftp_SetLogin(void *Sftp, char *newVal);

The Login Property syntax has these parts:

Part Description
void *Sftp Handle of the created Sftp instance.
char *Buffer Buffer that will hold the returned string. Holds login/username for authentication on the server.
int *Bufsize Size of the buffer.

Remarks

This value MUST be set for wodSFTP to work. The SSH protocol specification (on top of which SFTP is running) requires that login information is sent during the 'handshake' - so that there is no user interaction during the login process.

For Password authentication, all the information needed for successful authorization with remote server is stored in the Login and Password properties.

If you prefer to use PublicKey authentication, see the PrivateKey property.

Login property can be empty if Authentication is set to authGSSAPI since wodSFTP will retrieve your username from the system.

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.


Back to product page