On Tuesday, 1 August 2017 15:13:07 CEST olegstiv . wrote:
> Hello, I'm trying to make a server-client using your library, but
> authorizing a public key is not achievable. I do on QT with ++. Can I
> specify on the server where the authorization file is located, my project
> is of course.
> On server:
> 
> Getcwd (buf, 2048);
> QString pathDir = QString (buf) + "/ hostkey /";
> 
> Ssh_bind_options_set (sshbind, SSH_BIND_OPTIONS_DSAKEY, qPrintable (pathDir
> + "ssh_host_dsa_key")));
> Ssh_bind_options_set (sshbind, SSH_BIND_OPTIONS_RSAKEY, qPrintable (pathDir
> + "ssh_host_rsa_key")));
> 
> In PathDIR = "/ home / olegstiv / project /
> build-SSHSERVER-Qt_5_8_0_gcc_64-Debug
> / server / hostkey /"

This just sets the keys for the KEX. If you want public key authentication you 
need to implement it!

The server example:

https://git.libssh.org/projects/libssh.git/tree/examples/samplesshd-cb.c

shows how to do it for password, you need to add a callback for public key 
authentication ...


        Andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                [email protected]

Reply via email to