fieldrndservices / libssh2-labview

A LabVIEW library for SSH client support via libssh2
Apache License 2.0
21 stars 2 forks source link

Login with PPK-file #49

Closed Clio75 closed 2 years ago

Clio75 commented 2 years ago

Thanx alot for this toolkit.

But I have a challenge(or a problem). I'm not able to get this a valide login using a assigned ppk fil. In your exsample I need both a public key and a private key. But I only have the server public key. Is there something I don't understand ?

If I try this In e.g. Putty I can give it this pkk file and username and it will connect to given server. Thanx for your help :)

volks73 commented 2 years ago

It looks like a PPK file is a file format specific to PuTTY. The libssh2 C library, and therefore this LabVIEW toolkit, do not recognize or use PPK files directly. You will need to extract the public and private keys from the PPK file using PuTTYGen.

While there is no standard format for saving public and private keys, so PuTTY uses their own, which combines the public and private keys into a single file, most non-PuTTY tooling uses the OpenSSH format, where the Public and Private keys are separate files. Once you have converted the PuTTY-specific PPK file into the OpenSSH format, you will be able to use the Public-Private key authentication in this LabVIEW toolkit using these separate files. See Public Key Authentication example VI once you have extracted the files from the PPK file.

Clio75 commented 2 years ago

Thanx for your quick answer. I needed som help from a friend to get the files in correct format. But when this was done it login as expected.

Thanx again for this lib :)