Add a more generic auth callback function.

You should be able to obtain passwords or usernames with this
function.

Signed-off-by: Andreas Schneider <mail@cynapses.org>


git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@198 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Andreas Schneider
2008-12-29 11:33:51 +00:00
parent 6ea3888054
commit f9f8ded7f0
6 changed files with 116 additions and 54 deletions

View File

@@ -454,7 +454,7 @@ int main(int argc, char **argv){
printf("\n");
/* no ? you should :) */
auth=ssh_userauth_autopubkey(session);
auth=ssh_userauth_autopubkey(session, NULL);
if(auth==SSH_AUTH_ERROR){
fprintf(stderr,"Authenticating with pubkey: %s\n",ssh_get_error(session));
ssh_finalize();