<div dir="ltr">Hello. I asked this question on github and the developer said to ask me this via email.<div class="gmail_quote"><div dir="ltr"><div style="margin-left:40px"><span style="background-color:rgb(207,226,243)">I know this is not so right place to ask, but I have no choice...<br>
I am using libssh2 and connecting to the server with pem cert file, it works fine.<br>
But now I have a new requirement: I need to authorize with two identity file simultaneously. Two separate private keys.<br>
Server requires from client to provide two different keys for auth.<br>
If I would do this with console shh client, it would look like this: <code>ssh -i /keys/first.pem -i /keys/second.pem user@host</code><br>
Two keys, one user session. Does it even possible with libssh2? And if yes - how to do this?<br>
And if not possible - can you give me any hints where and how I can implement it?</span></div><div style="margin-left:40px"><br></div><div>And your reply says:</div><div style="margin-left:40px"><span style="background-color:rgb(207,226,243)">There is a libssh2 dev email list for questions like this, found at
<a href="http://libssh2.org" target="_blank">libssh2.org</a>. As for your question, you'll receive multiple calls to the
user auth callback where you can provide multiple pem files.</span></div><div style="margin-left:40px"><span style="background-color:rgb(207,226,243)"><br></span></div><div><span style="background-color:rgb(207,226,243)"><span style="background-color:rgb(255,255,255)">So can you please give me a detailed answer about this. What callback was mented? sign_fromfile/sign_frommemory from userauth.c ? How exactly do I have to provide a second key? I have to add public key extraction logic for the second private key and modify every function for auth where the key is used or it can be solved in a more simple way? Can you give me please more detailed hints about how to implement this. <br></span></span></div><div><span style="background-color:rgb(207,226,243)"></span></div></div>
</div></div>