I have written a program that will iterate through all the Profiles you have loaded on your system, then iterate through all regions to build a list of all EC2 instances and information across your accounts in a single window. I added filters on tags so you can, for example, list all machines in said list with the tag "FTP Server".
Now that I have such a list of servers, I would like to say "I need a file copied to all the servers in the filtered list". The logon credentials are not the same per profile, so I intend to use the
"Amazon.Runtime.AWSCredentials credential = new Amazon.Runtime.StoredProfileAWSCredentials(aprofile);"
to pull the keypair information from my credential store.
My problem is that I cannot determine how Visual Studio is passing the arguments to WinSCP to allow authentication using the keypair. I found the SFTPCopy function which looks really nice, but it takes the SshHostKeyFingerprint as an argument and not a keypair.
The complete code for my project is at https://github.com/StivOstenberg/AWSTrycorderPrototype . It works great for viewing and filtering EC2 instances, now trying to get it to interact with them using WinSCP. How do we submit the keypair instead of a password? And do we explicitly have to padd the fingerprint, or will it find in the certmgr?