Subject: libssh2_userauth_publickey functionning

libssh2_userauth_publickey functionning

From: <scout_game_at_hushmail.me>
Date: Tue, 23 Oct 2012 16:26:55 +0100

Good morning;
I want to use libssh2_userauth_publickey for my apps, I have seen a usage of this function from agent.c source file, but here I don't understand what is going on. Normally libssh2_userauth_publickey_fromfile() requires both public and private keys to authenticate. This is usual but I haven't seen libssh2_userauth_publickey uses any private key but only a public key in its argument as unsigned char* variable. So should I setup my ssh to authenticate without providing a private key before using libssh2_userauth_publickey ? if yes I have no clue how to do that, maybe should I generate the pub/priv keys from the remote server and copy the public key to my local computer but I haven't tried that trick before so don't know if this is the solution or there is something else hidden.
Regards

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-10-23