Skip to content

ssh banner too large error #567

@yoousra

Description

@yoousra

Hi,

Used versions:

libnetconf2-3.7.10
libssh-0.10.5
netopeer2-2.4.5
sysrepo-3.7.11
libyang-3.13.6

I have a question about the banner leaf used in the callhome over ssh: https://github.com/CESNET/libnetconf2/blob/v3.7.10/modules/libnetconf2-netconf-server%402025-06-02.yang#L284

In the .yang it says the max length is 247 characters, so I fill it with 247, but the callhome 'connect' fails with error:

Starting the SSH session failed (Receiving banner: too large banner).

When I print the final content of the banner used in libssh code, I see that it starts with SSH-2.0- and then the content I filled the leaf banner with, and then potentially some other characters (maybe the Carriage Return (CR) and the single Line Feed (LF) as mentioned here: https://datatracker.ietf.org/doc/html/rfc4253#section-4.2 section 4.2 ?), with in total over 255 characters = SSH-2.0- + my_banner + CR + LF (maybe?) which gives 257 characters if we calculate the CR and LF if I understand well, which exceeds 255 characters, hence the error.

But this is just the hypothesis I made, so I wanted to make sure, does libnetconf2 add SSH-2.0- (and other characters?) to the banner I give?

Thank you for your clarification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:bugBug description.status:completedFrom the developer perspective, the issue was solved (bug fixed, question answered,...)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions