title: Can't connect to SFTP (with private key file) in Copy Data Tool
body: <p>I am trying to copy data from SFTP to blob but got stuck when creating SFTP source.</p>
  
  <p>I have the connection details and can easily connect on Filezilla or WinSCP. However, I am unable to get it to work in Azure data factory.</p>
  
  <p>I am not using code but the user interface.</p>
  
  <p>The connection details on the page creating the SFTP source:
  Connect via integration runtime: AutoResolveIntegrationRuntime (default)</p>
  
  <pre><code>Host: xyz
  
  Port: 22 (can't remove it as it doesn't like it)
  
  SSH Host Key Validation: Enable SSH Host Key Validation
  
  SSH Host Key Finger-print: taken from WinSCP - Session - Server/protocol information
  
  Authentication type: SSH Public Key Authentication   -can't use basic as the private key holds the security info
  
  User name:XXX
  
  Private Key Type: Use Key Content
  
  Private key content: loaded the .ppk file, tried also tried loading the .pem file and got different errors
  
  Pass Phrase: none
  </code></pre>
  
  <p>When setting up this sftp in WinSCP or FileZilla it automatically converted the provided .pem file into .ppk.
  When I loaded the .ppk file into ADF I got an error: Invalid Sftp credential provided for 'SshPublicKey' authentication type. 
  When I loaded the .pem file I got: Meet network issue when connect to Sftp server 'spiderftp.firstgroup.com', SocketErrorCode: 'TimedOut'. </p>
  
  <p>I have also tried 'Disable SSH Host Key Validation' in SSH Host Key Validation and made no difference.</p>
  
  <p>I have also opened the .ppk file in PuttyGen and used that host key finger print and still no luck.</p>
  
  <p>Only getting these 2 errors depending on which file I load.</p>
  
  <p>Can't find anything about this online so would be grateful for some advice.</p>