Back to product page

Service property


Holds service type for a request service.

Type

A SSHServiceTypesenumeration.

Syntax

  • Basic
object.Service(Index)  
The Service(object,Index) syntax has these parts:
objectAn expression evaluating to an object of type SSHUser.
IndexRequired. An Integer value. Represents position of the service among all services used by the user.

Remarks

SSH2 protocol allows one client, at the same time, to use more than one service. SSH2 protocol describes this as 'channels'. Upon connection, client usually opens main channel that is used for shell access to the server, but can simultaneously open few more channels, such as SFTP access (to transfer files), port forwarding (to secure existing connections), etc.

You can not close particular service. If you wish to deny certain service to the user, you should do so in ServiceRequest event. If you wish to disconnect certain service, you *must* disconnect the client using Disconnect method - which will close other services also.

Possible services are

None (stNone, 0) describes that no service is used. You are required to send and receive data to the user.

Shell access (stShell, 1) means that user is currently having access to command prompt.

Executing program (stExecute, 2) means that user is currently running some program. Program name was specified during ServiceRequest event, in ServicePath variable.

Executing subsystem (stSubsystem, 3) currently only SFTP subsystem is supported. This value describes that user is currently transferring files.

Port forwarding (stPortForwarding, 4) means that user has opened port as forwarding pipe to some external service. This is commonly used to secure email or other plaintext connections between client and the server.

Secure file copy (stSCP, 5) is used when user executes 'SCP" command on the client side, trying to copy files between his system and wodSSHServer. wodSSHServer intercepts these requests, and uses integrates SCP server to handle upload/download. SftpDownloadFile and SftpUploadFile events will be fired.

Platforms

Windows