SSHServiceRequest Event

Fired when a client requests a service to be started.

Syntax

ANSI (Cross Platform)
virtual int FireSSHServiceRequest(SSHDaemonSSHServiceRequestEventParams *e);
typedef struct {
int ConnectionId;
const char *Service;
int Accept; int reserved; } SSHDaemonSSHServiceRequestEventParams; Unicode (Windows) virtual INT FireSSHServiceRequest(SSHDaemonSSHServiceRequestEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR Service;
BOOL Accept; INT reserved; } SSHDaemonSSHServiceRequestEventParams;
- (void)onSSHServiceRequest:(int)connectionId :(NSString*)service :(int*)accept;
#define EID_SSHDAEMON_SSHSERVICEREQUEST 14

virtual INT IPWORKSSSH_CALL FireSSHServiceRequest(INT &iConnectionId, LPSTR &lpszService, BOOL &bAccept);

Remarks

The SSHServiceRequest event is fired when a client requests that a service be started for a particular connection, identified by ConnectionId. Service will be the name of the service the client wishes to start. If the connection is authenticated and the user has access to the service, set Accept to true to allow the SSHDaemon to accept the request.

Note: Processing long-running requests, including sending channel data, inside this event may cause the underlying transport to stop processing SSH data until the event returns. In order to prevent this from happening, all requests should be processed asynchronously in a separate thread outside of this event.

Copyright (c) 2023 /n software inc. - All rights reserved.
IPWorks SSH 2020 C++ Edition - Version 20.0 [Build 8501]