Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. sftp

sftp

BSD-2-ClauseGov1.13.10

SFTP client and server implementation for Go, providing file system operations over SSH connections.

GitHubGitHub
1.6k stars395 forks0 contributors

What is sftp?

pkg/sftp is a Go package that provides both SFTP client and server implementations for secure file transfer operations over SSH connections. It enables Go applications to perform remote file system operations like reading, writing, listing, and managing files on SSH servers. The package integrates with Go's standard crypto/ssh package and offers an API that mirrors Go's os package for familiarity.

Target Audience

Go developers who need to implement SFTP functionality in their applications, whether as clients connecting to remote servers or as servers providing file access to SFTP clients. This includes developers building automation tools, backup systems, or file management applications.

Value Proposition

Developers choose pkg/sftp because it provides a complete, idiomatic Go implementation of both SFTP client and server with an API that feels native to Go. Unlike generic SFTP libraries, it's specifically designed for Go's ecosystem and integrates seamlessly with Go's existing SSH infrastructure.

Overview

SFTP support for the go.crypto/ssh package

Use Cases

Best For

  • Building Go applications that need to transfer files securely over SSH
  • Implementing SFTP servers in Go to serve files to remote clients
  • Creating automation tools that interact with remote file systems
  • Developing backup systems that use SFTP for secure data transfer
  • Building file management utilities that work with SSH servers
  • Adding SFTP client functionality to existing Go applications

Not Ideal For

  • Projects requiring high-performance, low-latency file transfers with advanced optimizations like compression or delta sync
  • Applications needing a standalone SFTP CLI tool without writing custom Go code
  • Teams that prefer protocols other than SSH, such as FTP or WebDAV, for file transfers

Pros & Cons

Pros

Familiar Go Interface

The API mirrors Go's standard os package, making it intuitive for Go developers, as noted in the README where it states 'The basic operation of the package mirrors the facilities of the os package.'

Dual Client and Server

Provides both SFTP client and server implementations in one package, enabling versatile use cases like building automation tools or serving files securely.

SSH Integration

Built on top of Go's crypto/ssh package, ensuring secure connections and seamless integration with existing SSH infrastructure, as highlighted in the project description.

Go Idiomatic Design

Offers a clean, idiomatic Go implementation specifically for the Go ecosystem, making it a natural fit for developers building Go applications with SFTP needs.

Cons

Code Duplication Issues

The README's roadmap admits 'There is way too much duplication in the Client methods,' which could impact code maintainability and future development.

Sparse Inline Documentation

Examples and usage are referenced externally to pkg.go.dev, lacking comprehensive built-in documentation that might slow down initial adoption or debugging.

Limited Advanced Features

Focuses on core SFTP operations without built-in support for features like batch transfers, resumable uploads, or protocol extensions, requiring additional implementation effort.

Frequently Asked Questions

Quick Stats

Stars1,638
Forks395
Contributors0
Open Issues48
Last commit7 days ago
CreatedSince 2013

Tags

#golang-package#file-transfer#client-library#go#sftp#ssh

Built With

G
Go

Included in

Go169.1kSSH2.8k
Auto-fetched 1 day ago

Related Projects

fasthttpfasthttp

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http

Stars23,341
Forks1,816
Last commit4 days ago
webrtcwebrtc

Pure Go implementation of the WebRTC API

Stars16,238
Forks1,835
Last commit3 days ago
kcptunkcptun

Reliable UDP Transmission Optimizer based on KCP: Enhancing network efficiency in poor connectivity environments.

Stars14,406
Forks2,629
Last commit16 days ago
cloudflaredcloudflared

Cloudflare Tunnel client

Stars13,929
Forks1,262
Last commit8 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub