NetBurner 3.5.0
PDF Version |
|
NetBurner SSH API. More...
#include <nettypes.h>
#include <stdio.h>
#include <basictypes.h>
#include <ssh/wolfssh/ssh.h>
#include <ssh/NetBurner/UserAuthManager.h>
#include <ssh/NetBurner/SshSocket.h>
Go to the source code of this file.
Typedefs | |
typedef int(* | sshUserAuthenticateFn) (const char *usernamePtr, const char *passwordPtr) |
[DEPRECATED] User provided SSH username and password authenticate routine for a server. Please consider sshUserAuthenticateWithTypeFn. | |
typedef int(* | sshUserAuthenticateWithTypeFn) (const char *usernamePtr, const char *authValPtr, AuthType authType) |
User provided SSH user authenticate routine for a server. | |
typedef int(* | sshGetUserPwFn) (const NBString &usernamePtr, NBString &passwordPtr) |
User provided SSH user password authentication routine for clients. | |
typedef int(* | sshGetUserKeyFn) (const NBString &usernamePtr, NBString &publicKey, NBString &privateKey, NBString &keyType) |
User provided SSH user key authenticate routine for clients. | |
typedef int(* | sshUserGetKeyFn) (int keyRequested, const unsigned char **keyBufferPtr, int *keyLengthPtr) |
The user defined callback to get the server key used during the initial SSH negotiation. | |
Functions | |
void | SshSetUserAuthenticate (sshUserAuthenticateFn sshUserAuthenticateFnPtr) |
[DEPRECATED] Sets the user defined server authentication function. Please consider sshUserAuthenticateWithTypeFn. | |
sshUserAuthenticateFn | SshGetUserAuthenticate (void) |
[DEPRECATED] Gets the user defined server authentication function. Please consider SshGetUserAuthenticateWithType. | |
void | SshSetUserAuthenticateWithType (sshUserAuthenticateWithTypeFn sshUserAuthenticateFnPtr) |
Sets the user defined server authentication function. | |
sshUserAuthenticateWithTypeFn | SshGetUserAuthenticateWithType (void) |
Gets the user defined server authentication function.. | |
void | SshClientSetGetUserPaswordFn (sshGetUserPwFn sshGetUserPwFnPtr) |
Sets the user defined client authentication function for getting user passwords during SSH authentication. | |
sshGetUserPwFn | SshClientGetUserPaswordFn (void) |
Gets the user defined client authentication function for getting a user password during authentication. | |
void | SshClientSetGetUserKeyFn (sshGetUserKeyFn sshGetUserKeyFnPtr) |
Sets the user defined client authentication function for getting user keys during SSH authentication. | |
sshGetUserKeyFn | SshClientGetUserKeyFn (void) |
Gets the user defined client authentication function for getting a user key during authentication. | |
void | SshSetUserGetKey (sshUserGetKeyFn sshUserGetKeyFnPtr) |
Sets the user defined callback method to provide the server key. | |
sshUserGetKeyFn | SshGetUserGetKey (void) |
Gets the user defined callback method to provide the server key. | |
bool | SshValidateKey (const char *candidateKey, int candidateKeySize, int *keyTypePtr, int keyFormat=WOLFSSH_FORMAT_ASN1) |
Takes a key and returns if it's valid or not. | |
bool | SshWritePublicKey (int publicKeyFd, unsigned char *candidateKey, int candidateKeySize) |
Write public key to file descriptor. Takes both PEM and ANS1 formats. | |
int | NbSshInit () |
Initializes the underlying SSH framework. This will start a background task used to handle negotiations and SSH traffic. This is automatically called by SshAccept and SshConnect, and doesn't need to be called directly except in special circumstances. | |
int | SshAccept (int listenFd, IPADDR *clientAddress, uint16_t *securePort, uint16_t timeout) |
Accepts and negotiates SSH session. Automatically calls NbSshInit() if required. | |
int | SshConnect (IPADDR clientAddress, uint16_t securePort, uint16_t localPort, uint16_t timeout, const char *username) |
Issues a connect request to negotiates an SSH session. Automatically calls NbSshInit() if required. | |
SshSocket * | SshNegotiateSession (int fd) |
Negotiates an SSH server session on an open file descriptor. | |
SshSocket * | SshNegotiateSessionClient (int secureFd, const char *username) |
Negotiates an SSH client session on an open file descriptor. | |
void | SshPrintStatistics (int secureFd) |
Negotiates an SSH client session on an open file descriptor. | |
int | SshGetKeySize () |
Determins and returns SSH's installed key size. | |
int | SshSetBannerText (const char *banner) |
Sets the banner text displayed by the SSH server on connection. | |
int | SshSetSockOption (int fd, int option) |
Set SSH TCP socket options. | |
int | SshClrSockOption (int fd, int option) |
Clear SSH TCP socket options. | |
int | SshGetSockOption (int fd) |
Returns the options for the specified SSH TCP socket. | |
NetBurner SSH API.