SKOPOS-ELEMENTS / SFTPTools_Alteryx

📦 Tools for downloading & uploading files from/to SFTP servers in Alteryx. Based on the Python SDK.
MIT License
5 stars 1 forks source link

What key Types does this support #4

Open AndrewMMain opened 3 years ago

AndrewMMain commented 3 years ago

I got an error "Not a DSA-compliant key file" when using this tool. Does it only support DSA key types? The private key file we are using was generated using ssh-keygen -t RSA.

neurotroph commented 3 years ago

Hi @AndrewMMain,

we are relying on the pysftp library for connecting to the server, which in turn uses paramiko. Both libraries support both DSA and RSA type keys (see http://docs.paramiko.org/en/stable/api/keys.html). Did you secure your key file with a password?

Some users of pysftp seem to have problems with .ppk-files and can connect when the file is converted to an .pem-file: https://aws.amazon.com/premiumsupport/knowledge-center/convert-pem-file-into-ppk/

Best Christopher

AndrewMMain commented 3 years ago

Thanks Christopher. The key file is not secured with a password. Does it need to be?

The comment in the configuration is a little confusing as it states "(i.e no .ppk file)!" 2020-11-25_10-03-09

neurotroph commented 3 years ago

Yes, you are right, sorry, we had this disclaimer already in there. And no, the key file does not need to be password protected. Just wanted to make sure to understand the setup.

I don't have access to an SFTP server right now where I could try out different key files, so it's a bit hard to properly debug this right now. I'd check where paramiko fails in reading the key file directly in Python. Feel free to reach out via email (christopher.harms@skopos-elements.de), so maybe we can discuss this in a bit more detail and implement a solution into the tool.

Best Christopher