Back to product page
- Introduction
- Overview
- License agreement
- Getting Started
- Objects
- Enumerations
- wodSSHD
- Methods
- Properties
- Events
- Connecting
- CryptoInformation
- Disconnected
- LoginGSSAPI
- LoginPassword
- LoginPubkey
- PortBindRequest
- PortForwardConnect
- PortForwardDisconnect
- PortForwardRequest
- Received
- ServiceRequest
- ServiceStart
- SftpDeleteFile
- SftpDownloadFile
- SftpFileTransferData
- SftpListDir
- SftpListDirData
- SftpMakeDir
- SftpProgress
- SftpRemoveDir
- SftpRename
- SftpTransferComplete
- SftpUploadFile
- StateChanged
- IwodSSHDNotify
- Methods
- Connecting
- CryptoInformation
- Disconnected
- LoginGSSAPI
- LoginPassword
- LoginPubkey
- PortBindRequest
- PortForwardConnect
- PortForwardDisconnect
- PortForwardRequest
- Received
- ServiceRequest
- ServiceStart
- SftpDeleteFile
- SftpDownloadFile
- SftpFileTransferData
- SftpListDir
- SftpListDirData
- SftpMakeDir
- SftpProgress
- SftpRemoveDir
- SftpRename
- SftpTransferComplete
- SftpUploadFile
- StateChanged
- Methods
- SSHKeyPair
- SSHUser
- SSHUsers
- How to get support
- Technical information
- Fast notifications
- Error list
PortForwardRequest method
Called when user wants to connect to other host through the server.
Type
NoneSyntax
- Basic
object.PortForwardRequest Owner, User, RemoteHost, RemotePort, Action
The PortForwardRequest(object,Owner,User,RemoteHost,RemotePort,Action) syntax has these parts:
The PortForwardRequest(object,Owner,User,RemoteHost,RemotePort,Action) syntax has these parts:
object | An expression evaluating to an object of type IwodSSHDNotify. |
Owner | A wodSSHDcom object. Instance of wodSSHServer that called this notification method. |
User | A SSHUser object. Reference to user who requested port forwarding. |
RemoteHost | A String value. Represents remote hostname where wodSSHServer should connect. |
RemotePort | A Long value. Port on remote server where wodSSHServer should connect. |
Action | A SSHActions enumeration, as described in settings. Action to perform - Allow allows connection, Deny refuses it. |
Remarks
The settings for Action are:
Constant | Value | Description |
---|---|---|
Deny | 0 | Deny execution of the action. |
Allow | 1 | Allow to execute action. |
This method is called only if you implemented IwodSSHNotify interface in your application, and wodSSHD.Notification property has received reference to instance of your implementation.
This notification method is called when connected user requests service from wodSSHD to connect to specific hostname/port on some other server. If you want to allow this action, set Action to Allow. wodSSHD will initiate connection with the server at that point. If connection is successfull, client will be notified, and wodSSHD will start forwarding data from the client to the end-point of forwarded connection, and vice versa.
Forward requests are typically used to protect plain communication from 3rd party sniffing (eavesdropping). For example, instead of connecting from his computer, client can request server to initiate connection for him. Complete traffic between wodSSHD server and the client will be encrypted (it's traveling through already established SSH connection).
You can change RemoteHost and RemotePort values from this notification. If you do so, client will not be aware of this change, and it will still think it got connected to the host/port for which his request was initiated.
If wodSSHD should bind some port on the server and accept connections, notification method PortBindRequest will be called.
Since version 1.1.1.1, it is possible that RemoteHost="" and RemotePort=0. This happens when you change service type in ServiceRequest notification method to stPortForwarding. This notification method is called in such cases so you can specify on which host and port user's service will be redirected..