I work with an application that is implementing SFTP/FTPS. The client private keys are loaded by the user for the connection and stored in a database (encrypted AND compressed) by a client application.
I am attempting to implement the SFTP feature. I get the client private key data from the server (the entire contents of the file). I convert it to a byte array and then load it into the SecureFTPConnection.ClientPrivateKeyBytes property using System.Buffer.BlockCopy(). No matter which file format I receive (PuTTY, OpenSSH or SSH.com), I get the following error when I attempt to connect:
Request failed: Failed to recognize key format. Supported formats are OpenSSH, SSH.com and PuTTY.
What data specifically should get put into the ClientPrivateKeyBytes property? Should it include the key's header/footer information? Should it include newline characters?
...Glenn