---
name: "libssh2_sftp_get_channel"
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_sftp_get_channel"
---

# libssh2\_sftp\_get\_channel(3)

return the channel of sftp

## NAME

libssh2\_sftp\_get\_channel - return the channel of sftp

## SYNOPSIS

```
#include <libssh2.h>
#include <libssh2_sftp.h>
LIBSSH2_CHANNEL *
libssh2_sftp_get_channel(LIBSSH2_SFTP *sftp);
```

## DESCRIPTION

*sftp* - SFTP instance as returned by **[libssh2\_sftp\_init(3)](/libssh2_sftp_init/3.md)**

Return the channel of the given sftp handle.

## RETURN VALUE

The channel of the SFTP instance or NULL if something was wrong.

## AVAILABILITY

Added in 1.4.0

## SEE ALSO

**[libssh2\_sftp\_init(3)](/libssh2_sftp_init/3.md)**
