libssh2_session_startup(3)
π libssh2_session_startup β the manual page, but make it make sense π
okay bestie, welcome to the libssh2 girlies' corner of the man pages. this one lives in the libssh2 manual, section 3, and it's literally all about kicking off the transport layer. let's get into it π«Ά
β¨ NAME β¨
libssh2_session_startup β begin transport layer
πΈ SYNOPSIS πΈ
#include <libssh2.h>
int
libssh2_session_startup(LIBSSH2_SESSION *session, int socket);
π¦ DESCRIPTION π¦
β οΈ warning bestie β οΈ starting in libssh2 version 1.2.8, this function is considered deprecated. use libssh2_session_handshake(3) instead. like, fr fr, it's giving legacy code energy π
- session β the Session instance as returned by
libssh2_session_init_ex(3) - socket β Connected socket descriptor. Typically a TCP connection though the protocol allows for any reliable transport and the library will attempt to use any berkeley socket.
so what does it actually do? it begins the transport layer protocol negotiation with the connected host. that's the whole vibe. β¨
π RETURN VALUE π
Returns 0 on success, negative on failure. iconic. simple. periodt π
π₯ ERRORS π₯
LIBSSH2_ERROR_SOCKET_NONEβ The socket is invalid.LIBSSH2_ERROR_BANNER_SENDβ Unable to send banner to remote host.LIBSSH2_ERROR_KEX_FAILUREβ Encryption key exchange with the remote host failed.LIBSSH2_ERROR_SOCKET_SENDβ Unable to send data on socket.LIBSSH2_ERROR_SOCKET_DISCONNECTβ The socket was disconnected.LIBSSH2_ERROR_PROTOβ An invalid SSH protocol response was received on the socket.LIBSSH2_ERROR_EAGAINβ Marked for non-blocking I/O but the call would block.
ngl that's a lot of ways for things to go wrong, but we stay hydrated and we read the error codes π§
π SEE ALSO π
that's the whole page, bestie π this one's from libssh2 0.15, dated 1 Jun 2007 β vintage but still slaying in the archive. mwah ππ¦β¨
π¦ where this page comes from
- alpine 3.22: libssh2-doc 1.11.1-r3 Β· BSD-3-Clause
- alpine 3.23: libssh2-doc 1.11.1-r4 Β· BSD-3-Clause
- alpine 3.24: libssh2-doc 1.11.1-r4 Β· BSD-3-Clause
- arch rolling: libssh2 1.11.1-7 Β· BSD-3-Clause
- debian trixie: libssh2-1-dev 1.11.1-1+deb13u1 Β· BSD3
- debian trixie: libssh2-1-dev 1.11.1-1+deb13u2 Β· BSD3
- epel 10: libssh2-docs 1.11.1-9.el10_3 Β· BSD-3-Clause
- epel 9: libssh2-docs 1.11.1-9.el9 Β· BSD-3-Clause
- fedora 43: libssh2-docs 1.11.1-4.fc43 Β· BSD-3-Clause
- fedora 43: libssh2-docs 1.11.1-9.fc43 Β· BSD-3-Clause
- fedora 44: libssh2-docs 1.11.1-5.fc44 Β· BSD-3-Clause
- fedora 44: libssh2-docs 1.11.1-9.fc44 Β· BSD-3-Clause
- opensuse-leap 16.0: libssh2-devel 1.11.1-160000.5.1 Β· BSD-3-Clause
- opensuse-leap 16.0: libssh2-devel 1.11.1-160000.5.1 Β· BSD-3-Clause
- opensuse-leap 16.0: libssh2-devel 1.11.1-160000.5.1 Β· BSD-3-Clause
- opensuse-leap 16.0: libssh2-devel 1.11.1-160000.5.1 Β· BSD-3-Clause
- ubuntu questing: libssh2-1-dev 1.11.1-1build1
- ubuntu questing: libssh2-1-dev 1.11.1-1ubuntu0.25.10.2
- ubuntu resolute: libssh2-1-dev 1.11.1-1build2 Β· BSD3
- ubuntu resolute: libssh2-1-dev 1.11.1-1ubuntu0.26.04.4 Β· BSD3
- ubuntu stonking: libssh2-1-dev 1.11.1-6 Β· BSD3
- π the page's license: BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms