Page 1 of 1

keyboard-interactive mode without user interaction

Posted: Fri 11 Jun 2010 10:32
by Ruekaka
Hi everybody,

I want to use the components for SSH/SFTP in a background process, so I’m not able to type in the password into the box, but can only use the keyboard-interactive mode for a specific server.

Some applications like WinSCP or ZOC can login without user interaction (to the same server, with the same configuration). It seems that they are simulating the keyboard input.

Is it possible to use the components in the same way (using the keyboard-interactive mode, but without typing in the password)?

Thanks in advance for any help.
With kind regards,
Ruediger Kabbasch

Posted: Fri 11 Jun 2010 10:59
by Dimon
To not ask the password when using the keyboard-interactive autentification, you should do needed processing in the TScSSHClient.AuthenticationPrompt event handler, like this:

Code: Select all

  if Length(Responses) > 0 then
    Responses[0] := Password;
Also you can look at the example of handling this event in the SSHClient demo.

Posted: Fri 11 Jun 2010 14:13
by Ruekaka
Perfect, thanks!

Kind regards,
Ruediger Kabbasch