Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Thanks for the reply.

Re: Automation with Passhprase protected PrivateKey

Remove the passphrase protection. That's the only way.

Automation with Passhprase protected PrivateKey

Is there any way to fully automate sending files using WinSCP & Pageant, when the private key is passphrase protected?

I am using a command line argument to start Pageant (if not already running), and load the required key: System.Diagnostics.Process.Start(@"C:\pageant.exe", @"C:\myPrivateKey.ppk");

When I execute the above line I get a dialogue to enter the passphrase for the private key. It all works fine after I enter the passphrase.

The issue is that the key is passphrase protected, and the program I am writing needs to run on a server that nobody ever sees, so I am trying to work out how to get it fully automated. From what I have read on the FAQ and the forums, you cannot avoid having to enter your passphrase the first time you load the key.

Is there any way to fully automate per my requirement, whereby no user interaction is required when using SFTP with passphrase protected private key?

I'd appreciate any feedback or help, would consider any solution, even if it means using completely different software to meet the requirements.