aboutsummaryrefslogtreecommitdiff
path: root/lib/ssh/sftp/sftp.go
AgeCommit message (Collapse)Author
2026-01-15all: convert license and copyright to use SPDX identifiersShulhan
With help of spdxconv tool [1], we able to bulk update all files license and copyright format to comply with SPDX formats. [1] https://kilabit.info/project/spdxconv/
2023-12-17ssh/sftp: update comments to use references [...]Shulhan
2022-05-09all: reformat all codes using gofmt 1.19 (the Go tip)Shulhan
2021-07-12ssh/sftp: export the open file method as OpenFileShulhan
The OpenFile method open remote file with custom flag and with specific file attributes.
2021-07-12ssh/sftp: provide better error handlingShulhan
This changes check and return an error if * the server does not support sftp subsystem as ErrSubsystem * the client does not support the server version as ErrVersion Some response status code from server actually can be mapped to predefined errors from standar package, in this case * io.EOF for SSH_FX_EOF (status code 1) * fs.ErrNotExist for SSH_FX_NO_SUCH_FILE (status code 2) * fs.ErrPermission for SSH_FX_PERMISSION_DENIED Other errors are handled by wrapping ErrXxx variable withresponse message.
2021-07-12ssh/sftp: new package that implement SSH File Transport Protocol v3Shulhan
The sftp package extend the golang.org/x/crypto/ssh package by implementing "sftp" subsystem using the ssh.Client connection.