Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodTstCustomSSHClient.Login

function Login(const aUsername: string; const aService : string = '') : Boolean;
Step 2: authenticates as aUsername, running the methods configured in UserAuthOptions (publickey via ClientKey, password via Password / OnGetClientPassword, etc.) until one succeeds. aService defaults to 'ssh-connection', which on success creates the channel Broker so CreateChannel can be used. Returns False (or raises with the server's list of methods still to try) when authentication does not complete. Client-side operation. A Close from another thread cancels it as it cancels ConnectToHost - an OnGetClientPassword handler under way ends first - and then no Broker is made. The Broker is made as Login ends, under the lock Close takes, so a Close that comes after that closes the connection as after a Login.