libssh2\_session\_banner\_set(3) libssh2 libssh2\_session\_banner\_set(3)

# [NAME](#NAME)

libssh2\_session\_banner\_set - set the SSH protocol banner for the local client

# [SYNOPSIS](#SYNOPSIS)

```
#include <libssh2.h>
int
libssh2_session_banner_set(LIBSSH2_SESSION *session, const char *banner);
```

# [DESCRIPTION](#DESCRIPTION)

*session* - Session instance as returned by [**libssh2\_session\_init\_ex(3)**](/man/os/libssh2/libssh2_session_init_ex.3)

*banner* - A pointer to a zero-terminated string holding the user defined banner

Set the banner that will be sent to the remote host when the SSH session is started with [*libssh2\_session\_handshake(3)*](/man/os/libssh2/libssh2_session_handshake.3) This is optional; a banner corresponding to the protocol and libssh2 version will be sent by default.

# [RETURN VALUE](#RETURN_VALUE)

Returns 0 on success or negative on failure. It returns LIBSSH2\_ERROR\_EAGAIN when it would otherwise block. While LIBSSH2\_ERROR\_EAGAIN is a negative number, it is not really a failure per se.

# [ERRORS](#ERRORS)

*LIBSSH2\_ERROR\_ALLOC* - An internal memory allocation call failed.

# [AVAILABILITY](#AVAILABILITY)

Added in 1.4.0.

Before 1.4.0 this function was known as [libssh2\_banner\_set(3)](/man/os/libssh2/libssh2_banner_set.3)

# [SEE ALSO](#SEE_ALSO)

**[libssh2\_session\_handshake(3)](/man/os/libssh2/libssh2_session_handshake.3),** [**libssh2\_session\_banner\_get(3)**](/man/os/libssh2/libssh2_session_banner_get.3)

9 Sep 2011 libssh2

---

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