libssh2\_trace(3) libssh2 libssh2\_trace(3)

# [NAME](#NAME)

libssh2\_trace - enable debug info from inside libssh2

# [SYNOPSIS](#SYNOPSIS)

```
#include <libssh2.h>
void
libssh2_trace(LIBSSH2_SESSION *session, int bitmask);
```

# [DESCRIPTION](#DESCRIPTION)

This is a function present in the library that can be used to get debug info from within libssh2 when it is running. Helpful when trying to trace or debug behaviors. Note that this function has no effect unless libssh2 was built to support tracing! It is usually disabled in release builds.

**bitmask** can be set to the logical OR of none, one or more of these:

[LIBSSH2\_TRACE\_SOCKET](#LIBSSH2_TRACE_SOCKET)

Socket low-level debugging

[LIBSSH2\_TRACE\_TRANS](#LIBSSH2_TRACE_TRANS)

Transport layer debugging

[LIBSSH2\_TRACE\_KEX](#LIBSSH2_TRACE_KEX)

Key exchange debugging

[LIBSSH2\_TRACE\_AUTH](#LIBSSH2_TRACE_AUTH)

Authentication debugging

[LIBSSH2\_TRACE\_CONN](#LIBSSH2_TRACE_CONN)

Connection layer debugging

[LIBSSH2\_TRACE\_SCP](#LIBSSH2_TRACE_SCP)

SCP debugging

[LIBSSH2\_TRACE\_SFTP](#LIBSSH2_TRACE_SFTP)

SFTP debugging

[LIBSSH2\_TRACE\_ERROR](#LIBSSH2_TRACE_ERROR)

Error debugging

[LIBSSH2\_TRACE\_PUBLICKEY](#LIBSSH2_TRACE_PUBLICKEY)

Public Key debugging

26 Dec 2008 libssh2 1.0

---

Document: libssh2_trace(3) from libssh2 1.11.1-r11 (Chainguard OS)
Source: https://github.com/libssh2/libssh2.git
