---
name: "libssh2_banner_set"
section: "3"
platform: "linux"
package: "libssh2"
version: "1.11.1-7"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libssh2_banner_set"
---

# libssh2\_banner\_set(3)

set the SSH protocol banner for the local client

## NAME

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

## SYNOPSIS

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

## DESCRIPTION

This function is **DEPRECATED** in 1.4.0. Use the *[libssh2\_session\_banner\_set(3)](/libssh2_session_banner_set/3.md)* function instead!

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

*banner* - A pointer to a 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)](/libssh2_session_handshake/3.md)** This is optional; a banner corresponding to the protocol and libssh2 version will be sent by default.

## RETURN VALUE

Return 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.

## AVAILABILITY

Marked as deprecated since 1.4.0

## ERRORS

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

## SEE ALSO

**[libssh2\_session\_handshake(3)](/libssh2_session_handshake/3.md)**
