‎09-10-2008 01:53 PM
I am trying to run pscp, a Putty utility, to send a file to a Linux box from a test PC. The problem is this machine will be testing many different units. With each unit there will be a different RSA key that is used for authentication. When I send the command I am prompted to accept the key y or n. Is there a way to implement this with the system exec? After a key is pressed the transfer does fine. It is getting past the key authentication that is the problem. Any help would be greatly appreciated.
Troy
‎09-10-2008
03:12 PM
- last edited on
‎11-15-2025
01:18 PM
by
Content Cleaner
What type of prompt is this? Is it a dialog box or are you supposed to press a key on the keyboard? For either method you need to make the window active which you can do with the Windows API and the lvwutil library you can find here. At that point what you do depends on whether you have a dialog or you need to press a key. For a dialog you need to simulate pressing a button which you can also do with the Windows API. For the keyboard same idea. You can also do this with AutoIt, which doesn't require Windows API programming and has a relatively simple ActiveX interface.
‎09-11-2008 11:41 PM
Hi Troy,
Unlike scp on Linux, pscp accepts input from stdin. I think that passing cmd /c "echo y | pscp args..." to the system exec VI will get you past the trusted host prompt.
Brad
‎09-18-2008 12:18 PM