keyboard-interactive mode without user interaction

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
Ruekaka
Posts: 7
Joined: Thu 10 Jun 2010 13:24

keyboard-interactive mode without user interaction

Post by Ruekaka » Fri 11 Jun 2010 10:32

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

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 11 Jun 2010 10:59

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.

Ruekaka
Posts: 7
Joined: Thu 10 Jun 2010 13:24

Post by Ruekaka » Fri 11 Jun 2010 14:13

Perfect, thanks!

Kind regards,
Ruediger Kabbasch

Post Reply