---
name: "libssh2_agent_get_identity_path"
section: "3"
platform: "linux"
package: "libssh2"
version: "1.11.1-7"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libssh2_agent_get_identity_path"
---

# libssh2\_agent\_get\_identity\_path(3)

gets the custom ssh-agent socket path

## NAME

libssh2\_agent\_get\_identity\_path - gets the custom ssh-agent socket path

## SYNOPSIS

```
#include <libssh2.h>
const char *
libssh2_agent_get_identity_path(LIBSSH2_AGENT *agent);
```

## DESCRIPTION

Returns the custom agent identity socket path if set using libssh2\_agent\_set\_identity\_path()

## RETURN VALUE

Returns the socket path on disk.

## AVAILABILITY

Added in libssh2 1.9

## SEE ALSO

**[libssh2\_agent\_init(3)](/libssh2_agent_init/3.md)** **[libssh2\_agent\_set\_identity\_path(3)](/libssh2_agent_set_identity_path/3.md)**
