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
keyboard-interactive mode without user interaction
To not ask the password when using the keyboard-interactive autentification, you should do needed processing in the TScSSHClient.AuthenticationPrompt event handler, like this:
Also you can look at the example of handling this event in the SSHClient demo.
Code: Select all
if Length(Responses) > 0 then
Responses[0] := Password;