Topic "Automation with Passhprase protected PrivateKey"

Author Message
[View user's profile]

Joined: 2013-04-29
Posts: 2
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.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26572
Location: Prague, Czechia
Remove the passphrase protection. That's the only way.
Martin Prikryl
[View user's profile]

Joined: 2013-04-29
Posts: 2
Thanks for the reply.

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License