Registry / networking / pkg-sftp

pkg-sftp

JSON →
library1.13.10gogounverified

Package sftp implements the SSH File Transfer Protocol as described in draft-ietf-secsh-filexfer-02.

go get github.com/pkg/sftp
INSTALL
IMPORT
SIG · PKG-SFTP
P
pkg-sftp
networkinggov1.13.10
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sftp
github.com/pkg/sftp

List files in the root directory over SFTP.

package main import ( "fmt" "golang.org/x/crypto/ssh" "github.com/pkg/sftp" ) func main() { config := &ssh.ClientConfig{ User: "user", Auth: []ssh.AuthMethod{ssh.Password("pass")}, HostKeyCallback: ssh.InsecureIgnoreHostKey(), } conn, _ := ssh.Dial("tcp", "example.com:22", config) client, _ := sftp.NewClient(conn) defer client.Close() files, _ := client.ReadDir("/") for _, f := range files { fmt.Println(f.Name()) } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.13.10latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
pkg-sftp — go get pkg-sftp · libregistry