1
1
Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Jakub Jelen
cc92e74309 examples: Load ED25519 key when loading all keys
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-07-30 16:19:27 +02:00
Eric Bentley
db67fcbe88 examples: add public key authentication to ssh_server_fork
I noticed that there was no example showing server side public key encryption in the examples
so I added this one. I used authorizedkeys as a global to minimize the changes to the original
code as well as I was not sure the correct methodology of determining the .ssh directory location
for a user not using Linux. One code using the user parameter to determine the location to use
instead if desired.

Signed-off-by: Eric Bentley <ebentley66@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-01-24 17:48:04 +01:00
Andreas Schneider
7e6b540277 exmpales: Init rc in ssh_server_fork
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-10-24 09:48:35 +02:00
Andreas Schneider
a19513b87a example: Add missing error checks in ssh_server_fork
CID 1393676

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-30 14:37:04 +02:00
Andreas Schneider
ed6294b4bb examples: Do not include internal headers in ssh_server_fork
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-14 08:04:49 +01:00
William Orr
7070117dc3 examples: Use safer names for stdin, stdout, stderr
BUG: https://red.libssh.org/issues/168

On some platforms, like OpenBSD, stdin and friends are macros which break
compilation of this struct. I've fixed these names such that it compiles and
runs cleanly on OpenBSD

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-20 19:27:14 +01:00
Alan Dunn
491b407d17 examples: Update ssh_server_fork for new SSH_BIND_OPTIONS_HOSTKEY
Tested by

ssh_server_fork -k <an ecdsa key> -k <an rsa key> ...

and connection succeeded with OpenSSH clients both for ECDSA and RSA
(the latter forced via -o HostKeyAlgorithms=ssh-rsa and some known
hosts clearing was necessary).  Also

ssh_server_fork -k <an ecdsa key> -k <another ecdsa key> ...

caused the second key to be used, as expected.

Signed-off-by: Alan Dunn <amdunn@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-09 10:59:21 +02:00
Alan Dunn
5c0c95bd34 examples: Add ECDSA key option to ssh_server_fork
Signed-off-by: Alan Dunn <amdunn@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-03-27 10:06:36 +01:00
Alan Dunn
c82dd2eb81 examples: Add no default keys options to ssh_server_fork
It seems useful to be able to run ssh_server_fork without being
required to load some key of RSA and DSA keytypes.  However, with the
current ssh_server_fork, you need to have some keys as some default
value is set by default and you can't unset the value for a keytype
(e.g. by using NULL as an argument).  So the "no default keys"
argument turns off the default key assignments.

Signed-off-by: Alan Dunn <amdunn@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-03-27 10:06:11 +01:00
Andreas Schneider
c96e862c08 examples: Add missing include for stderr.
This should fix the build on FreeBSD.
2014-02-17 09:20:46 +01:00
Audrius Butkevicius
afe97d6cab examples: Add ssh_server_fork example
Signed-off-by: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-02-16 17:52:50 +01:00