SFTP support for the go.crypto/ssh package
Go
Clone or download
eikenb no longer need new request after opendir stat
PR #257 fixes the issue with running Stat and Readdir on the same
Request. Thus we no longer need to close and recreate the Request
when handling an Opendir call.
Latest commit 57673e3 Jun 10, 2018
Permalink
Failed to load latest commit information.
examples Fix #182; use ssh connection meta-data in example Jun 29, 2017
server_standalone server_standalone: handle readonly properly Mar 15, 2017
.gitignore ignore test keys in all examples Jun 29, 2017
.travis.yml update travis for go 1.10 release Mar 5, 2018
CONTRIBUTORS Adding myself as I'm helping out Jan 7, 2017
LICENSE Rename LICENCE to LICENSE Oct 27, 2014
README.md soften contrib text a bit Apr 25, 2017
attrs.go Make request attribute structs public for docs May 11, 2018
attrs_stubs.go add windows as a build target to _stubs.go files Sep 20, 2015
attrs_test.go *: golint (part 1) Jan 7, 2016
attrs_unix.go *: golint (part 1) Jan 7, 2016
client.go Allow to configure maxConcurrentRequests May 28, 2018
client_integration_darwin_test.go Do not check bavail, it can change in a shared CI environment Jun 15, 2016
client_integration_linux_test.go vet: formatting directive in Fatal call Sep 22, 2016
client_integration_test.go Client.MkdirAll - mimic os.MkdirAll code for consistency & perf Apr 25, 2018
client_test.go Allow the use of packets smaller than 32768 bytes, and add MaxPacketC… Feb 22, 2018
conn.go set inflight chan buffer to 2 for deadlock Feb 7, 2018
debug.go added debug option, build/test with -tags debug to activate Sep 28, 2014
example_test.go Add example about ReadFrom + bufio interaction Jan 12, 2018
match.go Fixes #188; eliminates duplicated core code Jul 20, 2017
other_test.go Handle osx returning EPERM not ENOTDIR Dec 22, 2015
packet-manager.go drop support for go versions <= 1.7 Jan 26, 2018
packet-manager_test.go Remove bad test Mar 4, 2018
packet-typing.go Send unsupported error on extended packets. Mar 19, 2018
packet.go Send unsupported error on extended packets. Mar 19, 2018
packet_test.go packet, server: use a single read-only check Jan 11, 2016
release.go added debug option, build/test with -tags debug to activate Sep 28, 2014
request-attrs.go Make request attribute structs public for docs May 11, 2018
request-attrs_test.go Make request attribute structs public for docs May 11, 2018
request-errors.go support handlers returning explicit error codes Jan 27, 2018
request-example.go fix punctuation May 11, 2018
request-interfaces.go improve Handler interface documentation May 26, 2018
request-readme.md update Request structure docs for path and flag changes Jan 4, 2018
request-server.go no longer need new request after opendir stat Jun 11, 2018
request-server_test.go Opendir return an error status when not found May 26, 2018
request-unix.go Revert "rename files with OS specific request test code" Mar 2, 2017
request.go fix issue with reusing opendir file handle Jun 6, 2018
request_test.go test case to trigger error on opendir handle reuse Jun 6, 2018
request_windows.go Revert "rename files with OS specific request test code" Mar 2, 2017
server.go Opendir return an error status when not found May 26, 2018
server_integration_test.go a few code simplifications Feb 15, 2018
server_statvfs_darwin.go add serverside StatVFS function, implemented for darwin and linux (#89) Jun 13, 2016
server_statvfs_impl.go Remove gccgo special cases Feb 2, 2018
server_statvfs_linux.go Remove gccgo special cases Feb 2, 2018
server_statvfs_stubs.go Remove gccgo special cases Feb 2, 2018
server_stubs.go Changed default user and group to root and count links for directorie… Aug 10, 2017
server_test.go Send unsupported error on extended packets. Mar 19, 2018
server_unix.go Revert "lookup username/group-name for longname" May 24, 2018
sftp.go use ietf link for sftp spec everywhere Oct 2, 2017

README.md

sftp

The sftp package provides support for file system operations on remote ssh servers using the SFTP subsystem. It also implements an SFTP server for serving files from the filesystem.

UNIX Build Status GoDoc

usage and examples

See godoc.org/github.com/pkg/sftp for examples and usage.

The basic operation of the package mirrors the facilities of the os package.

The Walker interface for directory traversal is heavily inspired by Keith Rarick's fs package.

roadmap

  • There is way too much duplication in the Client methods. If there was an unmarshal(interface{}) method this would reduce a heap of the duplication.

contributing

We welcome pull requests, bug fixes and issue reports.

Before proposing a large change, first please discuss your change by raising an issue.

For API/code bugs, please include a small, self contained code example to reproduce the issue. For pull requests, remember test coverage.

We try to handle issues and pull requests with a 0 open philosophy. That means we will try to address the submission as soon as possible and will work toward a resolution. If progress can no longer be made (eg. unreproducible bug) or stops (eg. unresponsive submitter), we will close the bug.

Thanks.