![]() |
TrustCore SDK NanoSSH API reference
version 7.0
|
Functions | |
| MOC_EXTERN sbyte4 | SSH_getTerminalSettingDescr (sbyte4 connectionInstance, terminalState **ppTerminalSettings) |
| Get a pointer to a connection instance's negotiated terminal settings. More... | |
| MOC_EXTERN sbyte4 | SSH_ioctl (sbyte4 connectionInstance, ubyte4 ioctlSelector, ubyte4 ioctlValue) |
| Change a NanoSSH server setting value. More... | |
| MOC_EXTERN sshSettings * | SSH_sshSettings (void) |
| Get a pointer to NanoSSH server settings. More... | |
| MOC_EXTERN sbyte4 SSH_getTerminalSettingDescr | ( | sbyte4 | connectionInstance, |
| terminalState ** | ppTerminalSettings | ||
| ) |
This function retrieves a pointer to the specified connection instance's negotiated terminal settings.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_SERVER__ __ENABLE_MOCANA_SSH_ASYNC_SERVER_API__ | connectionInstance | Connection instance returned from SSH_acceptConnection() or SSH_ASYNC_acceptConnection(). |
| ppTerminalSettings | On return, pointer to the client's terminal settings. |
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.| MOC_EXTERN sbyte4 SSH_ioctl | ( | sbyte4 | connectionInstance, |
| ubyte4 | ioctlSelector, | ||
| ubyte4 | ioctlValue | ||
| ) |
This function dynamically updates a selected NanoSSH server setting.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_SERVER__ __ENABLE_MOCANA_SSH_ASYNC_SERVER_API__ | connectionInstance | Connection instance returned from SSH_acceptConnection() or SSH_ASYNC_acceptConnection(). |
| ioctlSelector | Setting to change, specified as an "SSH ioctls" definition from ssh.h; current option is limited to SET_SSH_MAX_SESSION_TIME_LIMIT. |
| ioctlValue | Value to assign to the setting. |
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.| MOC_EXTERN sshSettings* SSH_sshSettings | ( | void | ) |
This function returns a pointer to NanoSSH server settings that can be dynamically adjusted during initialization or runtime.
The default values for the following basic settings are suitable for most systems:
SSH_sshSettings()->sshListenPort = 22; SSH_sshSettings()->sshMaxAuthAttempts = 20; SSH_sshSettings()->sshTimeOutOpen = 2000; SSH_sshSettings()->sshTimeOutKeyExchange = 10000; SSH_sshSettings()->sshTimeOutNewKeys = 15000; SSH_sshSettings()->sshTimeOutServiceRequest = 4000; SSH_sshSettings()->sshTimeOutAuthentication = 1000 * 60 * 10; SSH_sshSettings()->sshTimeOutDefaultOpenState = 0; // no timeout SSH_sshSettings()->sshMaxConnections = 4;
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSH_SERVER__