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
Send method
Sends string expression to the user.
Type
NoneSyntax
- Basic
object.Send Text, [ServiceIndex]
The Send(object,Text,ServiceIndex) syntax has these parts:
The Send(object,Text,ServiceIndex) syntax has these parts:
object | An expression evaluating to an object of type SSHUser. |
Text | Required. A String value. Text that will be sent to the user. |
ServiceIndex | Optional. A Variant value. Index of the service you're sending data to. |
Remarks
Send method is used to send arbitrary text data to connected user at any time, if applicable. You can use it to create random 'chat sessions' with the user, or to send specific information to the user.Send method becomes valid after ServiceStart event is fired for particular service. It can be used only if Service is set to stNone, stShell or stExecute. Using Send method with stSubsystem or stPortForwarding can produce unexpected results and will probably cause client to receive garbled data, and finally disconnect.
ServiceIndex parameter is optional. If not set, default service is used (this is usually a shell). You can generate custom banners when someone connects to the server as easy as this (VB sample):
Private Sub wodSSHD1_ServiceStart(ByVal User As wodSSHDComLIB.ISSHUser, ByVal ServiceIndex As Long, ByVal ServiceType As wodSSHDComLIB.SSHServiceTypes, ByVal ServiceName As String)
' show nice message
User.Send "# # # ###### # #### #### # # ######" & vbCrLf
User.Send "# # # # # # # # # ## ## #" & vbCrLf
User.Send "# # # ##### # # # # # ## # #####" & vbCrLf
User.Send "# # # # # # # # # # #" & vbCrLf
User.Send "# # # # # # # # # # # #" & vbCrLf
User.Send " ## ## ###### ###### #### #### # # ######" & vbCrLf
User.Send vbCrLf & "You have connected to wodSSHD server. Feel free to stay." & vbCrLf & vbCrLf
User.Send "You are coming from host " & User.RemoteIP & vbCrLf
User.Send "Your login is " & User.Login & vbCrLf
User.Send "You connected at " & Format(User.TimeConnected, "dddd, mmm d yyyy h:m") & vbCrLf
User.Send "So far you have received " & User.BytesDownload & " bytes"
User.Disconnect ' this isn't really very nice from us
End Sub