[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: server API, I can not get authorization by key


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                asn@xxxxxxxxxxxxxx

Follow-Ups:
Re: Fwd: server API, I can not get authorization by key"olegstiv ." <olegstiv1@xxxxxxxxx>
References:
Fwd: server API, I can not get authorization by key"olegstiv ." <olegstiv1@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org