Jakub Jelen
4b85934198
examples: Enable strict build
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-12-23 14:31:32 +01:00
Andreas Schneider
0938d397be
examples: Use SSH_STRING_FREE_CHAR()
...
Fixes T183
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-12-09 16:08:03 +01:00
Andreas Schneider
8d62257172
examples: Fix integer types in libssh_scp.c
...
Fixes T188
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-12-09 16:08:03 +01:00
Andreas Schneider
0773696ee5
examples: Remove internal include from sshd_direct-tcpip.c
...
Fixes T188
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-12-09 16:08:03 +01:00
Andreas Schneider
4ab0fb2b48
cmake: Do not use cached LIBSSH_PUBLIC_INCLUDE_DIRS
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2019-11-07 14:01:01 +01:00
Andreas Schneider
82c57c1f36
cmake: Create ssh library directly as libssh
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2019-11-07 14:01:00 +01:00
Anderson Toshiyuki Sasaki
29d360dc70
examples: Build keygen2 only if argp is available
...
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-11-07 14:00:15 +01:00
Anderson Toshiyuki Sasaki
b30875c6c7
examples: Added keygen2 example
...
The added example is an application which can generate keys of different
types using libssh.
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-11-07 10:53:49 +01:00
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
Andreas Schneider
0734bc490f
examples: Fix freeing the channel in ssh_client
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2019-07-08 17:26:21 +02:00
Andreas Schneider
b275045ac8
examples: Update header in ssh_client
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-07-08 15:02:38 +02:00
Andreas Schneider
b5a8547d91
exmples: Use SSH_CONNECTOR_STDINOUT in client example
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-07-08 14:58:59 +02:00
Anderson Toshiyuki Sasaki
b1ff11f416
examples: Check ssh_event_dopoll() return value
...
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-06-27 10:31:46 +02:00
Andreas Schneider
7e344ca052
examples: Fix a possible resource leak in sshd_direct-tcpip
...
CID 1398985
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2019-05-28 09:18:52 +02:00
Andreas Schneider
5a590dfb5f
examples: Fix unused parameter warnings in sshd_direct-tcpip
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-02-21 10:51:07 +01:00
Till Wimmer
881e1b4785
examples: Add direct-tcpip server sample
...
Signed-off-by: Till Wimmer <g4-lisz@tonarchiv.ch>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-02-20 16:39:31 +01:00
Jakub Jelen
5700477f3e
examples: Add simple way to generate key files from libssh
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-02-07 10:30:05 +01:00
Eric Bentley
83d86ef6a5
examples: add public key auth for specific key
...
There was no example of using a specific key for authentication so I added
one.
Signed-off-by: Eric Bentley <ebentley66@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-01-24 17:48:08 +01: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
12ec1fed2f
examples: Zero fds in sshnetcat
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-10-24 09:48:35 +02:00
Andreas Schneider
0ff566b6dd
examples: Explicitly track auth state in samplesshd-kbdint
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-10-19 12:31:04 +02:00
Andreas Schneider
16b876d07f
examples: Use ssh_session_update_known_hosts() for updating known_hosts
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-10-16 08:58:31 +02:00
Andreas Schneider
e210b61148
examples: Reformat knownhosts
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-10-05 14:38:43 +02:00
Anderson Toshiyuki Sasaki
31202822a7
examples: Add null checks in libssh_scp.c
...
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-27 15:21:30 +02:00
Anderson Toshiyuki Sasaki
6118628424
examples: Fix libssh_scp.c code style
...
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-27 15:21:30 +02:00
Anderson Toshiyuki Sasaki
00e5ef1b3c
examples: Fix possible memory leak in libssh_scp.c
...
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-27 15:21:30 +02:00
Andreas Schneider
4c47719d98
examples: Reformat authenticaton.c
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-20 15:37:23 +02:00
Anderson Toshiyuki Sasaki
f246e31ca0
examples: Fix code style in samplesftp.c
...
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-18 10:19:59 +02:00
Anderson Toshiyuki Sasaki
7390db6bbb
examples: Fixed possible memory leak in samplesftp.c
...
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-18 10:19:59 +02:00
Andreas Schneider
2b05e46b62
examples: Reformat ssh_client
...
The example should be clean code if possible.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-31 10:21:06 +02:00
Andreas Schneider
5b07c1aa2c
examples: Use ssh_print_hash()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-29 19:04:44 +02:00
Andreas Schneider
a9a99fb31f
cmake: Improve compiler flag detection
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-20 18:42:03 +02:00
Andreas Schneider
1d9f548204
examples: Fix function declaration in sshnetcat
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-20 18:42:03 +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
8917b84840
examples: Make gobal variables static in scp_download
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-30 14:37:04 +02:00
Andreas Schneider
4b0fd10a99
examples: Define LIMIT as unsinged long
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-30 14:37:04 +02:00
Andreas Schneider
5012a9c146
examples: Use new known hosts functions
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-04 11:20:28 +02:00
Andreas Schneider
01994ea302
examples: Build server examples on Linux too
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-11-08 16:28:35 +01:00
Andreas Schneider
2ec633f33d
examples: Rename samplessh to ssh-client
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-11-07 15:28:52 +01:00
Andreas Schneider
2e70077bbc
examples: Fix fallthrough compiler warnings
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-08-25 10:06:00 +02:00
Andreas Schneider
fa2332354b
examples: Reformat usage() function
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-05 15:53:20 +01:00
Andreas Schneider
d5068ed07d
examples: Fix endif()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-04 14:25:46 +02:00
Andreas Schneider
d4e3401c23
examples: Fix building on FreeBSD
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-03 12:12:23 +02:00
Aris Adamantiadis
f8be4d1b3b
sample: Migrate client to connector API
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-02 16:59:18 +02:00
Andreas Schneider
0faffac020
examples: Do not usre deprecated functions
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-02 16:55:29 +02:00
Andreas Schneider
2384236849
cmake: Try to fix FindArgp module
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-17 10:42:52 +01:00
Aris Adamantiadis
5027627344
cmake: detect argp.h on osx
2016-03-14 22:27:06 +01:00
Fabiano Fidêncio
d1d003c232
buffer: use ssh_buffer_get() instead of ssh_buffer_get_begin()
...
This commit is a preparatory stage for removing ssh_buffer_get_begin().
Note that removing ssh_buffer_get_begin() doesn't break API
compatibility, as this functions has never been exposed (it only has the
LIBSSH_API prefix).
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19 11:31:08 +01: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