NetBurner 3.5.0
PDF Version |
|
SSH Server with User Authorization Example
A SSH Server task is created that will listen for incoming SSH connections on TCP port 22. This simple example uses a key that is generated onboard the device the first time it is powered on. This key will be valid for one year. To allow the certificate to automatically renew when it's expired, enable ENABLE_AUTOCERT_REGEN
, found in nbrtos\include\predef.h
.
This example demonstrates how to user the UserAuthManager, which will let you maintain user password/key information that can be used when authenticating users trying to log on to your device. In this example, we store the data in the UserParam space, but the UserAuthManager will let you determine where that information is saved and loaded from with the callbacks that are passed into the object during construction.
To use the example: