goph
goph copied to clipboard
panic: sftp: "Failure" (SSH_FX_FAILURE)
Here is my codeοΌ
err = client.Upload("./test.txt", "/root/")
if err != nil {
panic(err)
}
it will raise error(sftp: "Failure" (SSH_FX_FAILURE)) when remotePath is not full path. It is necessary to adapt the path without a file name
Hi, It should be like:
err = client.Upload("./test.txt", "/root/test.txt")
I'm sorry,I know how to do it. this is my suggestion: it should support transferring files when the path is incomplete. It's like: π
scp ./test.txt root@exampleHost:/root/
why not in v2 :smile: