# libssh2/libssh2

the SSH library

Repository: https://github.com/libssh2/libssh2
Canonical: https://ross.abutalabs.com/products/libssh2
Homepage: https://libssh2.org/
Language: C
License: BSD-3-Clause
License Family: permissive
Topics: libssh2, c, ssh, sftp, sftp-client, scp, library
Last push: 2026-08-26T16:22:46+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 8, longevity 100
- inputs: {"age_days": 4199, "days_push": 7, "days_rel": 686, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1572, forks 641 (observed 2026-08-28T04:05:05.563411+00:00)

## What it is
libssh2 is a client-side C library implementing the SSH2 protocol, licensed under the revised BSD license. It provides session establishment, authentication, encrypted channels, SFTP, SCP, and TCP port forwarding with pluggable crypto backends.

## Use cases
- add ssh file transfer (sftp) to my c application
- run remote commands over ssh from a program
- implement scp file uploads in c
- create ssh tunnels and port forwarding programmatically
- authenticate to ssh servers with public keys or passwords
- embed ssh2 protocol support in a non-python tool

## When to choose
- you need a lightweight, embeddable C library for SSH2 client functionality
- you need SFTP or SCP support in a native application
- you want control over sockets and blocking/non-blocking behavior
- you need a choice of crypto backends (OpenSSL, wolfSSL, mbedTLS, etc.)

## When to avoid
- you need an SSH server implementation (libssh2 is client-side only)
- you prefer a higher-level SSH library like libssh with more built-in features
- you are working in a managed language where a native binding adds complexity

## Facets
- artifact type: library
- maturity: stable
- function: security, cryptography, networking, file-system
- domain: security, networking, developer-tools, cross-platform
- platform: windows, cross-platform, c
- tags: ssh2, sftp, scp, client-side, bsd-license, port-forwarding, linux, macos

## Member repositories
- libssh2/libssh2 (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:05.563411+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:58:11.532386+00:00, confidence not recorded.
  - readme: https://github.com/libssh2/libssh2 (fetched 2026-08-28T04:05:05.563411+00:00, sha aba4be34e1cf)
  - homepage: https://libssh2.org/ (fetched 2026-08-29T11:28:03.117330+00:00, sha 63500ff744a5)
  - site_page: https://libssh2.org/docs.html (fetched 2026-08-29T11:28:03.126446+00:00, sha ddda3e1d0b0e)
  - site_page: https://libssh2.org/changes.html (fetched 2026-08-29T11:28:03.128399+00:00, sha a0af975c2299)
- Data as of 2026-08-30T08:39:29.467469+00:00.
