[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ssh_userauth_publickey_auto - file name of the key being unlocked
[Thread Prev] | [Thread Next]
- Subject: ssh_userauth_publickey_auto - file name of the key being unlocked
- From: Václav Kubernát <sir.venceslas@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 23 Apr 2020 10:47:38 +0200
- To: libssh@xxxxxxxxxx
Hello, I'm trying to use ssh_userauth_publickey_auto to authenticate to an SSH server. I posted a question on the bug tracker (https://bugs.libssh.org/T217) asking if it was possible to specify a callback for unlocking a key. I was able to set up the callback. However, I found out that the prompt arg the callback gets only reads "Passphrase". So, if I want to prompt the user for the password for the key, the user doesn't know which key he is supposed to unlock. I have already kind of solved the issue by reading and unlocking the key myself, and injecting the callback's private data with the filename, but that meant I had to reimplement most of the "auto" functionality myself, which seems like a waste. The code can be seen here: https://gerrit.cesnet.cz/c/CzechLight/netconf-cli/+/2286/16/src/cli-netconf.cpp#118. What do you think? Is it possible for ssh_userauth_publickey_auto to tell me which key it is currently unlocking via the callback? Or if not, what approach would you suggest? Thank you Václav Kubernát
Re: ssh_userauth_publickey_auto - file name of the key being unlocked | Jakub Jelen <jjelen@xxxxxxxxxx> |