Unable to create a New SFTP Linked service connection using Public Key Authentication

Puneet, Mithun 1 Reputation point
2020-08-31T22:09:18.193+00:00

Hi,

I am currently having an issue setting up a SFTP linked service in ADF using public key authentication and getting the error as
'Invalid Sftp credential provided for 'SshPublickey' Authentication type. DER Length is 114 and cannot be more than 4 bytes'21741-error.png

Attaching the error.

Thanks much,

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,180 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,442 Reputation points Microsoft Employee
    2020-09-01T00:50:52.007+00:00

    Hi @Puneet, Mithun ,

    Welcome to Microsoft Q&A platform and thank you for using this forum.

    SFTP connector supports RSA/DSA OpenSSH key. Could you please make sure your key file content starts with "-----BEGIN [RSA/DSA] PRIVATE KEY-----".

    In case if the private key file is a ppk-format file, please use Putty tool to convert from .ppk to OpenSSH format.

    Reference MS doc: Use SSH public key authentication (Please see note section in this doc)

    Additional info : Please refer to this Stackoverflow thread and see if you can validate whether your passphrase for private key file is correct : C# getting “DER length is '95' and cannot be more than 4 bytes” error while using SSH Ftp

    Let us know how it goes.

    Thank you

    2 people found this answer helpful.