Can't use private key to auth

Advertisement

MikeDawg
Joined:
Posts:
5
Location:
Colorado

Can't use private key to auth

Using latest WinSCP 5.5.1. I'm unable to use private key for authentication, inside WinSCP.

I got to configure the sftp site I'm attempting to connect to, I go to Advanced Site Settings, go to SSH -> Authentication -> Private key file:

Now, beforehand, I was given a private key file, from openssh. I opened it in Pagent, and converted (exported private key) as a PPK file. When I try and select this PPK, I get the error message:

"File '"C:\<path to ppk>\private_key.ppk"' does not exist or it does not contain private key in known format."

This same PPK file, however, will load into pagent, and I can auth using WinSCP and pagent; but I would just like to cut out the pagent middle-man, and just run the auth from WinSCP.

Reply with quote

Advertisement

Simon T
Joined:
Posts:
1

This happens if the path or file name contains spaces. WinSCP adds quotes at the beginning and end of the "Private key file" field which causes the error message. Deleting the quotes fixed the problem for me.

Reply with quote

MikeDawg
Joined:
Posts:
5
Location:
Colorado

Simon T wrote:

This happens if the path or file name contains spaces. WinSCP adds quotes at the beginning and end of the "Private key file" field which causes the error message. Deleting the quotes fixed the problem for me.

That was the problem. Thank you sir!

Reply with quote

thedudeza
Guest

thanks

Simon T wrote:

This happens if the path or file name contains spaces. WinSCP adds quotes at the beginning and end of the "Private key file" field which causes the error message. Deleting the quotes fixed the problem for me.


Thank y ou so much!!!

Reply with quote

Advertisement

You can post new topics in this forum