libssh2_knownhost_del(3)

πŸ“¦
version 1.11.1 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, epel 10, epel 9, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– libssh2_knownhost_del(3) πŸ’–

okay bestie, so this is a page from the libssh2 manual, and it's all about libssh2_knownhost_del β€” the little function that says "girl, bye" to a known host entry. no cap. let's get into it πŸ¦‹


✨ NAME ✨

libssh2_knownhost_del β€” delete a known host entry πŸ’…


✨ SYNOPSIS ✨

#include <libssh2.h>

int
libssh2_knownhost_del(LIBSSH2_KNOWNHOSTS *hosts,
                      struct libssh2_knownhost *entry);

like, that's the whole vibe. two args. one job. iconic. πŸŽ€


✨ DESCRIPTION ✨

So what does it actually do? It deletes a known host entry from the collection of known hosts. that's it. that's the whole thing. it's giving "declutter your life" energy ✨

and entry? that's a pointer to a struct β€” and you don't just vibe your way into getting one of those, you extract it with libssh2_knownhost_check(3) or libssh2_knownhost_get(3). those are your two plug-ins for the pointer, iykyk. so like, get your entry from one of those first, then come back here and delete it. 🫢


✨ RETURN VALUE ✨

It returns a regular libssh2 error code. and here's the thing, bestie, listen close:

  • negative values = error codes 😭
  • 0 = success πŸŽ‰

so if you get a zero, you ate. periodt. πŸ’…


✨ AVAILABILITY ✨

Added in libssh2 1.2 β€” so it's been around a minute, it's a classic, it's lowkey a legend. ⭐


✨ SEE ALSO ✨

go read these too, they're all in the same friend group:


and that's the page, bestie!! 🧚 this little gem is brought to you by libssh2, dated 28 May 2009 🌸 β€” yeah she's an elder but she still serves. mwah, go delete some hosts responsibly πŸ’œπŸ‘‘