Le 05/08/2013 11:07, Reinier Olislagers a ?crit :
Show quoted text 25 lines
On 05/08/2013 10:11, Antonio Fortuny wrote:
> Le 02/08/2013 17:22, Reinier Olislagers a ?crit :
>> On 02/08/2013 17:02, Antonio Fortuny wrote:
>>> I've copied the example from the wiki as a second test.
>>> I only set the pair login/password: same result as before (PAM
>>> autentication failed).
>>> Then I generated a pair of SSH2-rsa keys (1024) using puttygen and
>>> assigned the PrivateKey property to the private key file generated.
>>> Result is worse as an exception arises without explanation.
>> Read the wiki article. It should explain how to generate keys. The
>> format is not what you'd expect.
> I have had a complete read of
http://wiki.lazarus.freepascal.org/Synapse.
> Maybe because it is monday morning, I haven't read any reference to how
> to generate keys for SSH connection
Mmmph - I have that Monday morning feeling, too.
The wiki article says:
"LibSSH2 library. Pascal bindings still in development, but you can use
a file with your private key (in OpenSSH format) to authenticate. "
but you tried that and it didn't work - you *did* export the puttygen
private key file in openssh format, not the default putty format!?
I thought I had an example with libssh2+certificate auth lying around
somewhere but apparently I haven't, so that's about all I can say, sorry.
Aaaaaaaargh ! >:o
Definitely yes, IT IS monday morning.
I've read this text, but because I'm focused on cryptolib (ssl_cryptlib.pas and cryptlib.pas along with cl32.dll), I didn't take care of the LibSSH2 as the cryptolib seems to take care of the private key. In my mind the application has to play with a pair of keys like I use to do between two Linux boxes, exchanging eachother the gerated public key into the .ssh user's home folders. And yes, I saved putty's keys in OpenSSH format. When generating the keys, as I usually do with Linux boxes, I don't give a passphrase so I connect immediately. I still give a pair username/password (appropriate to the server into wich I want to connect.
BTW, isn't the public key used anymore ? As only the private key is mentioned, I wonder what to do with the public one.
Thanks anyway Reinier, I'll let you know if I succed to establish a connection.
Antonio.
Show quoted text 6 lines