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
LoginPubkey method
Called when user wants to authenticate to the server with public key.
Type
NoneSyntax
- Basic
object.LoginPubkey Owner, User, Login, PublicKey, Action
The LoginPubkey(object,Owner,User,Login,PublicKey,Action) syntax has these parts:
The LoginPubkey(object,Owner,User,Login,PublicKey,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 send his login information. |
Login | A String value. Holds login info entered by the user. |
PublicKey | A String value. Holds public key information provided by the user. |
Action | A SSHActions enumeration, as described in settings. Return variable you should set to Allow or Deny, depending if you will allow or deny access for the user. |
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.
LoginPubkey notification method is called when the client connects and tries to authenticate with the server. Since wodSSHServer does not have or keep any kind of database about users, you should test login and publickey to determine if you will allow client to connect or not. Typically, you will check this information against some database or file, and set Action variable to Allow - if access is allowed, or Deny - if access is NOT allowed. Make sure you also read about LoginPassword notification method that is called when user provides password instead of public key.
When client provides public key, wodSSHServer will check if signature that client provided matches his public key (which he provided in this connection). This may be security leak - he provides public key, he provides signature. Well - at this point LoginPubkey notification method is called so you can check if his public key matches one you have in your database (or some locally stored file). If public key is known - let user in.