![]() |
TrustCore SDK NanoSSH API reference
version 7.0
|
Functions | |
MOC_EXTERN void | SSH_disconnectAllClients (void) |
Disconnect all NanoSSH server clients. More... | |
MOC_EXTERN sbyte4 | SSH_startServer (void) |
Start the NanoSSH server. More... | |
MOC_EXTERN void | SSH_stopServer (void) |
Stop NanoSSH server from accepting any new client connections. More... | |
MOC_EXTERN void SSH_disconnectAllClients | ( | void | ) |
This function disconnects all the NanoSSH server's clients.
To enable this function, the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_SERVER__
__USE_MOCANA_SSH_SERVER__
Additionally, the following flag must not be defined:
__ENABLE_MOCANA_SSH_ASYNC_SERVER_API__
MOC_EXTERN sbyte4 SSH_startServer | ( | void | ) |
This function starts the NanoSSH server.
You can use the NanoSSH SSH daemon or your own CLI daemon to listen for and accept connections. To run multiple SSH Server instances, you can use your existing code or adapt the ssh_server.c sample code.
To enable this function, the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_SERVER__
__USE_MOCANA_SSH_SERVER__
Additionally, the following flag must not be defined:
__ENABLE_MOCANA_SSH_ASYNC_SERVER_API__
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.SINGLE_THREAD_SSH_SERVER
flag in moptions.h.MOC_EXTERN void SSH_stopServer | ( | void | ) |
This function stops the NanoSSH server from accepting any new client connections. (Existing active connection sessions remain active.)
To enable this function, the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_SERVER__
__USE_MOCANA_SSH_SERVER__
Additionally, the following flag must not be defined:
__ENABLE_MOCANA_SSH_ASYNC_SERVER_API__