add Realpath client public fn and fix server impl
4 files changed
tree: bd7490a75e42711e0c05dbf1ac6e7a91c5b99983
  1. .gitignore
  2. .travis.yml
  6. attrs.go
  7. attrs_stubs.go
  8. attrs_test.go
  9. attrs_unix.go
  10. client.go
  11. client_integration_darwin_test.go
  12. client_integration_linux_test.go
  13. client_integration_test.go
  14. client_test.go
  15. debug.go
  16. example_test.go
  17. examples/
  18. other_test.go
  19. packet.go
  20. packet_test.go
  21. release.go
  22. server.go
  23. server_integration_test.go
  24. server_standalone/
  25. server_stubs.go
  26. server_unix.go
  27. sftp.go


The sftp package provides support for file system operations on remote ssh servers using the SFTP subsystem.

UNIX Build Status GoDoc

usage and examples

See 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.


  • Currently all traffic with the server is serialized, this can be improved by allowing overlapping requests/responses.
  • 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.
  • Implement integration tests by talking directly to a real opensftp-server process. This shouldn't be too difficult to implement with a small refactoring to the sftp.NewClient method. These tests should be gated on an -sftp.integration test flag. in progress


We welcome pull requests, bug fixes and issue reports.

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