mirror of
https://github.com/libssh2/libssh2.git
synced 2025-07-31 00:03:08 +03:00
Enable trace debugging in example/ssh2
This is intended to be a test program, so debugging is likely to be useful by default.
This commit is contained in:
committed by
Dan Fandrich
parent
d4062feb3d
commit
6cba487395
@ -133,6 +133,19 @@ int main(int argc, char *argv[])
|
|||||||
* banners, exchange keys, and setup crypto, compression, and MAC layers
|
* banners, exchange keys, and setup crypto, compression, and MAC layers
|
||||||
*/
|
*/
|
||||||
session = libssh2_session_init();
|
session = libssh2_session_init();
|
||||||
|
/* Enable all debugging when libssh2 was built with debugging enabled */
|
||||||
|
libssh2_trace(session,
|
||||||
|
LIBSSH2_TRACE_TRANS |
|
||||||
|
LIBSSH2_TRACE_KEX |
|
||||||
|
LIBSSH2_TRACE_AUTH |
|
||||||
|
LIBSSH2_TRACE_CONN |
|
||||||
|
LIBSSH2_TRACE_SCP |
|
||||||
|
LIBSSH2_TRACE_SFTP |
|
||||||
|
LIBSSH2_TRACE_ERROR |
|
||||||
|
LIBSSH2_TRACE_PUBLICKEY |
|
||||||
|
LIBSSH2_TRACE_SOCKET
|
||||||
|
);
|
||||||
|
|
||||||
if(libssh2_session_handshake(session, sock)) {
|
if(libssh2_session_handshake(session, sock)) {
|
||||||
fprintf(stderr, "Failure establishing SSH session\n");
|
fprintf(stderr, "Failure establishing SSH session\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user