Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mattdetwiler
Contributor III
Contributor III

SFTP Web connector error

I'm trying to connect to an SFTP data source with a private key and passphrase.  I think everything is good but I'm getting the following error:  "There was an Error running the table (status code - 500.  A public key corresponding to the supplied private key was not accepted by the server or the user name is incorrect)

The user name is working on other systems just fine and I don't see anywhere where I can load the public key.  I've tried to check the "Allow self signed" option and that doesn't seem to be working.

Labels (1)
7 Replies
Jay_Brown
Support
Support

Hi @mattdetwiler ,

The Public key should be in place on the SFTP server.  You'll need to use the Private key file on the server that is hosting WebConnectors, then provide that info in the entry for Path To Private Key File.

It's been a while since I tested but I believe if you have the key for 'User1',  e.g. 'user1.pub', you would put it somewhere reachable such as 'D:\Keys' and then use the path as  D:\Keys\user1.pub for that user.

Edit: I just tested this and :

  1. Using PuttyGen,I created a new key pair and got the passphrase.
  2. I then created my user at the SFTP site and uploaded the public key for that user.
  3. I moved the private key to my WebConnectors server in C:\Temp\Keys.
  4. I went back to WebConnectors UI and it worked using "C:\Temp\Keys\private.ppk" in the Path To Private Key File field, and manually entering my passphrase.

I hope that helps!

To help users find verified answers, please don't forget to mark a correct resolution or answer to your problem or question as correct.
mattdetwiler
Contributor III
Contributor III
Author

Ok I have the private key in a folder that is allowed to the web connectors but it is giving me that error.  My devops team says they are able to connect to the SFTP server from that machine.

It feels like either Qlik is expecting me to use a password or maybe that the format of the key isn't what Qlik is expecting.  We are currently using a .pem format for Oracle Integration Services.

Jay_Brown
Support
Support

Hi @mattdetwiler , when I set this up the passphrase was required.  Did your DevOps team give that to you?

To help users find verified answers, please don't forget to mark a correct resolution or answer to your problem or question as correct.
mattdetwiler
Contributor III
Contributor III
Author

I have a passphrase but not a password

Jay_Brown
Support
Support

My lab environment works without a password for both download and upload.  All I need is the Private Key file File and the passphrase that goes with it. 

keygen.png

See the below config:

 

sftp_config.png

  1. dc.domain.local is the internal lab box where I host my own SFTP server.
  2. C:\Temp\Keys is where I have my private key file
    1. note this is C:\ on the Web Connectors server not my client machine, if I had it on a file share I would use \\server\share
  3. The Source location is where I have my file on the server.
  4. Remote path is the remote path on the SFTP server.

Can you post an obfuscated screenshot of your config?

 

--J

To help users find verified answers, please don't forget to mark a correct resolution or answer to your problem or question as correct.
mattdetwiler
Contributor III
Contributor III
Author

This is an SFTP site running on Azure  server.blob.core.windows.net

-If I change the host name it fails differently so I think that's good
-If I remove the .containername.username from the username I get a different error so it's seeing that
-If I remove the passphrase it's erroring out so it sees that too

It's almost like the username and passphrase are wrong but this combo works fine connecting from Oracle.

The error in the Qlik log is:

Rebex.Net.SftpException: A public key corresponding to the supplied private key was not accepted by the server or the user name is incorrect. ---> Rebex.Net.SshException: A public key corresponding to the supplied private key was not accepted by the server or the user name is incorrect.
at Rebex.Net.SshSession.dxgpo(String p0, String p1, SshPrivateKey p2, SshGssApiCredentials p3, Boolean p4)

So it seems like it's getting an error back from the SFTP server.

mattdetwiler
Contributor III
Contributor III
Author

We were able to create a new user with just a username and password (no key/passphrase) and it seems to be working. We think what may have been happening is even though Qlik was set up correctly with the key maybe it wasn't being sent.

I'm also wondering if this is a bug with Qlik Web connectors and Azure blob storage/SFTP