This is an old revision of the document!

How can I connect without entering private key passphrase each time?

The best solution is to use authentication agent (Pageant), so that you enter the passphrase only once.

If you need to avoid entering the passphrase to automate a task (such as with scripting or when using .NET assembly) and using authentication agent is not suitable for you, you can store the key unprotected (without an passphrase). Note that this imposes security risk, if someone gains access to the key. You should consider restricting access to the unprotected private key file to the local account that runs the script only (using Windows file system permissions).

Advertisement

WinSCP does not support providing the passphase from command line or by other means allowing automation. Anyway, this would not bring substantial advantage over unprotected key as the passphrase would need to be stored too (in a script), probably on the same data storage as the key.

Last modified: by martin