Discuss this help topic in SecureBlackbox Forum

TElSimpleSSHClient.OnPrivateKeyNeeded

TElSimpleSSHClient     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


This event is fired when a client's public key was accepted by the server, but the corresponding secret key is not present.

Declaration

[C#]
    event TSSHPrivateKeyNeededEvent OnPrivateKeyNeeded;
    delegate void TSSHPrivateKeyNeededEvent(Object Sender, TElSSHKey Key, ref bool Skip);

[VB.NET]
    Event OnPrivateKeyNeeded As TSSHPrivateKeyNeededEvent
    Delegate Sub TSSHPrivateKeyNeededEvent(ByVal Sender As Object, ByVal Key As TElSSHKey, ByRef Skip As Boolean)

[Pascal]
    property OnPrivateKeyNeeded : TSSHPrivateKeyNeededEvent;
    TSSHPrivateKeyNeededEvent = procedure (Sender: TObject; Key : TElSSHKey; var Skip : Boolean) of object;

[C++]
    void get_OnPrivateKeyNeeded(TSSHPrivateKeyNeededEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnPrivateKeyNeeded(TSSHPrivateKeyNeededEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TSSHPrivateKeyNeededEvent)(void * _ObjectData, TObjectHandle Sender, TElSSHKeyHandle Key, int8_t &Skip);

[PHP]
    TSSHPrivateKeyNeededEvent|callable|NULL get_OnPrivateKeyNeeded()
    void set_OnPrivateKeyNeeded(TSSHPrivateKeyNeededEvent|callable|NULL $Value)
    callable TSSHPrivateKeyNeededEvent(TObject $Sender, TElSSHKey $Key, bool &$Skip)

[Java]
    TSSHPrivateKeyNeededEvent getOnPrivateKeyNeeded();
    void setOnPrivateKeyNeeded(TSSHPrivateKeyNeededEvent Value);
    TSSHPrivateKeyNeededEvent.Callback OnPrivateKeyNeeded = new TSSHPrivateKeyNeededEvent.Callback() {
        public void TSSHPrivateKeyNeededEventCallback(TObject Sender, TElSSHKey Key, TSBBoolean Skip) {
            //...
        }
    }

Parameters

  • Key - the corresponding private key which is missing.
  • Skip - set this parameter to True when it is not possible to load the missing key for some reason.

Description

    This event is fired by TElSimpleSSHClient when the client's public key was accepted by the server, but the corresponding secret key is not present and thus the client is unable to authenticate using this key. The handler should load the corresponding private key into the passed Key object or set Skip parameter to True if it is not possible for some reason.

Discuss this help topic in SecureBlackbox Forum