SSH Private Key

Is there anyway to access the Private Key that corresponds to the Public Key?

I have to write a custom app to do some scheduled transfers and need to supply the same Private Key that SmartFTP is using. I thought it was located in the same directory as the Public Key but I get an invalid private key format when I try to use it.


Thanks for any help!

The private key contains the public key. The public however only contains the public key.

The private key contains the public key. The public however only contains the public key.

Thank you for your response. This protocol is new to me so I'm not sure I understand what I need to do. For the SFTP library I am using, I need to supply the private key. When I pass the "private key" file, I get an error that it's invalid. Is there a way to extract just the private key from the file?

Thanks again!

Thank you for your response. This protocol is new to me so I'm not sure I understand what I need to do. For the SFTP library I am using, I need to supply the private key. When I pass the "private key" file, I get an error that it's invalid. Is there a way to extract just the private key from the file?

Thanks again!


I think I was able to figure it out. I needed to convert to a different format using the openssl library.