Share via


SFTP connection failed while reading private key from keyvault but it works fine while reading the key content directly from the key file

Question

Friday, April 17, 2020 8:31 AM

I am able to store, access adls account key stored in Keyvault from data factory and adls connection is working fine. But when sftp private key is stored in keyvault as secret, sftp connection is getting failed with below error,

Invalid Sftp credential provided for 'SshPublicKey' authentication type. The input is not a valid Base-64 string as it contains a non-base64 character, more than two padding characters, or an illegal character among the padding characters.

Whereas, sftp connection works if I upload the same private key content directly browsing from file. Got to see a github issue on the same. Hence need clarification that if this bug is fixed.

https://github.com/MicrosoftDocs/azure-docs/issues/30551

All replies (2)

Friday, April 17, 2020 9:51 AM

Hi Vandana,

As mentioned in the below doc :

/en-us/azure/data-factory/connector-sftp#using-ssh-public-key-authentication

SFTP connector supports RSA/DSA OpenSSH key. Please make sure your key file content starts with "BEGIN [RSA/DSA] PRIVATE KEY". If the private key file is a ppk-format file, please use Putty tool to convert from .ppk to OpenSSH format.

Ref - https://stackoverflow.com/a/56416466/10653466

Hope this helps.


Wednesday, April 22, 2020 11:32 AM

Hi Vandana,

Just wanted to check - was the above suggestion helpful to you? If yes, please consider upvoting and/or marking it as answer. This would help other community members reading this thread.