SSHOPTIONDATA

This structure specifies additional option information for the client session. A pointer to this structure can be passed to the SshAsyncConnect or SshConnect functions.

#define SSH_MAXTERMNAMELEN   32
#define SSH_MAXHOSTNAMELEN      128
#define SSH_MAXUSERNAMELEN      128
#define SSH_MAXPASSWORDLEN      128
#define SSH_MAXCOMMANDLEN       512

typedef struct _SSHOPTIONDATA
{
    DWORD dwSize;
    DWORD        dwReserved;
    UINT  nProxyType;
    UINT  nProxyPort;
    TCHAR szProxyHost[SSH_MAXHOSTNAMELEN];
    TCHAR szProxyUser[SSH_MAXUSERNAMELEN];
    TCHAR szProxyPassword[SSH_MAXPASSWORDLEN];
    UINT  nTermCols;
    UINT  nTermRows;
    TCHAR szTermName[SSH_MAXTERMNAMELEN];
    TCHAR szCommandLine[SSH_MAXCOMMANDLEN];
} SSHOPTIONDATA, *LPSSHOPTIONDATA;

Members

dwSize
An unsigned integer value which specifies the size of the SSHOPTIONDATA structure. This member must be initialized prior to passing the structure to the SshAsyncConnect or SshConnect functions.
dwReserved
An unsigned integer value that is reserved for internal use, and should always be initialized to a value of zero.
nProxyType
An unsigned integer value that specifies the type of proxy that the client should connect through. This structure member is only used if the option SSH_OPTION_PROXYSERVER has been specified. Possible values are:
Constant Description
SSH_PROXY_NONE No proxy server should be used when establishing the connection.
SSH_PROXY_HTTP The connection should be established on port 80 using HTTP. An alternate port number can be specified by setting the nProxyPort structure member to the desired value.
SSH_PROXY_TELNET The connection should be established on port 23 using TELNET. An alternate port number can be specified by setting the nProxyPort structure member to the desired value.
nProxyPort
An unsigned integer value that specifies the port number which should be used to establish the proxy connection. A value of zero specifies that the default port number appropriate for the selected protocol should be used. This structure member is only used if the option SSH_OPTION_PROXYSERVER has been specified.
szProxyHost
A null terminated string which specifies the host name or IP address of the proxy server. This structure member is only used if the option SSH_OPTION_PROXYSERVER has been specified.
szProxyUser
A null terminated string which specifies the user name which is used to authenticate the connection through the proxy server. This structure member is only used if the option SSH_OPTION_PROXYSERVER has been specified.
szProxyPassword
A null terminated string which specifies the password which is used to authenticate the connection through the proxy server. This structure member is only used if the option SSH_OPTION_PROXYSERVER has been specified.
nTermCols
An unsigned integer value which specifies the number of columns for the virtual terminal allocated for the client session. The default number of columns is 80. This structure member is only used if the option SSH_OPTION_TERMINAL has been specified.
nTermRows
An unsigned integer value which specifies the number of rows for the virtual terminal allocated for the client session. The default number of rows is 25. This structure member is only used if the option SSH_OPTION_TERMINAL has been specified.
szTermName
A null terminated string which specifies the name of the terminal emulation type. On UNIX based systems, this name typically corresponds to an entry in the terminal capability database (either termcap or terminfo). If the name is not specified, then the default name terminal name of "unknown" will be used. This structure member is only used if the option SSH_OPTION_TERMINAL has been specified.
szCommandLine
A null terminated string which specifies the command that should be executed on the remote host. The output from the command is returned to the client, and the session is terminated. This structure member is only used if the option SSH_OPTION_COMMAND has been specified.

Requirements

Client: Requires Windows Vista, Windows XP or Windows 2000 Professional.
Server: Requires Windows Server 2008, Windows Server 2003 or Windows 2000 Server.
Header: Include cstools6.h.
Unicode: Implemented as Unicode and ANSI versions.


Copyright © 2008 Catalyst Development Corporation. All rights reserved.