tree: e5e531d24a8fc6ec950d2a196172db7a5c058153 [path history] [tgz]
  1. .gitignore
  2. .travis.yml
  5. Makefile
  7. allocator.go
  8. allocator_test.go
  9. attrs.go
  10. attrs_stubs.go
  11. attrs_test.go
  12. attrs_unix.go
  13. client.go
  14. client_integration_darwin_test.go
  15. client_integration_linux_test.go
  16. client_integration_test.go
  17. client_test.go
  18. conn.go
  19. debug.go
  20. example_test.go
  21. examples/
  22. go.mod
  23. go.sum
  24. match.go
  25. packet-manager.go
  26. packet-manager_test.go
  27. packet-typing.go
  28. packet.go
  29. packet_test.go
  30. release.go
  31. request-attrs.go
  32. request-attrs_test.go
  33. request-errors.go
  34. request-example.go
  35. request-interfaces.go
  36. request-plan9.go
  38. request-server.go
  39. request-server_test.go
  40. request-unix.go
  41. request.go
  42. request_test.go
  43. request_windows.go
  44. server.go
  45. server_integration_test.go
  46. server_standalone/
  47. server_statvfs_darwin.go
  48. server_statvfs_impl.go
  49. server_statvfs_linux.go
  50. server_statvfs_plan9.go
  51. server_statvfs_stubs.go
  52. server_stubs.go
  53. server_test.go
  54. server_unix.go
  55. sftp.go
  56. sftp_test.go
  57. stat_plan9.go
  58. stat_posix.go
  59. syscall_fixed.go
  60. syscall_good.go


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


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


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.