libssh2_agent_init(3)
β¨ NAME β¨
libssh2_agent_init β bestie, this is the one that spins up an ssh-agent handle π
π SYNOPSIS π
#include <libssh2.h>
LIBSSH2_AGENT *
libssh2_agent_init(LIBSSH2_SESSION *session);
π¦ DESCRIPTION π¦
okay so. this function inits an ssh-agent handle, periodt. it hands you back a handle that's the internal representation of an ssh-agent connection β like, the whole vibe of "i am about to talk to an agent" in one pointer πΈ
once the initialization actually succeeds, your app can go ahead and call libssh2_agent_connect(3) to connect to a running ssh-agent. that's the next step, the main character moment, iykyk π₯
and when you're done with the handle β like, actually done, no take-backs β call libssh2_agent_free(3) to free it again. very demure, very responsible, we love cleanup in this house π§
π RETURN VALUE π
returns a handle pointer, or NULL if something went wrong π no cap.
that returned handle is the input to all the other ssh-agent related functions libssh2 provides β so yeah, it's basically the passport for the entire agent friend group π«Ά
β AVAILABILITY β
added in libssh2 1.2 β¨ (yes she's been iconic since way back)
π SEE ALSO π
and that's the whole page, bestie β this was libssh2_agent_init(3) from the libssh2 manual, dated 23 Dec 2009, brought to you by libssh2 itself. go forth and init your handles, you absolute legend ππ
π¦ 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