In Power Automate Desktop, when you use a private key file as an authentication method in the Open secure FTP connection action, you may receive the following error message:

Error message: “Can’t connect to ServerHost”.
More error details: "Robin.Core.ActionException: Can’t connect to ServerHost ---> Renci.SshNet.Common.SshException: Invalid private key file".
Here ServerHost is the FTP server host address used in the action.


This error can occur if the format of the private key file is not using OpenSSH format. Power Automate Desktop explicitly checks that the private key file format is OpenSSH, where the key should start with: 

---- BEGIN ___ PRIVATE KEY ----


To correct the private key file format (OpenSSH Format), make sure that the text in the file looks similar to the following:




----END ___ PRIVATE KEY----

You can also use PuTTY Key Generator (PuttyGen.exe) to convert the key file to the OpenSSH format. To do that:

  1. Load your existing private key file in PuTTY Key Generator.

  2. Click Conversions > Export OpenSSH key (not the "force new file format" option).

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!