-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file transfer with SFTP with curl is not working #13561
Comments
Thanks a lot for your report! I've failed to reproduce this problem myself, so can I ask you to provide us with more details on how to go ahead and repeat this. Preferably with a command line or a stand-alone program we can run from our ends against a public URL to trigger the problem? Also: please tell us the full |
when we transfer file using SFTP cmd: "sftp://10.68.196.198:22/OMSFTPVerify.testfile -> /tmp/OMSFTPVerify.testfile", its showing error in curl : "Access denied to remote resource(9)". This the curl -v output curl -Vcurl 8.7.1 (x86_64-pc-linux-gnu) libcurl/8.7.1 OpenSSL/3.0.7 zlib/1.2.11 brotli/1.0.9 zstd/1.5.1 libidn2/2.3.0 libssh2/1.11.0 let us know if you required any information and aslo how could it be fixed. Thanks, |
So there's a SSH authentication problem. What method are you using? |
we are using password authentication method for SSH authentication. |
We need more in order to help. curl returns an error because your are denied access. That's not a curl bug. |
Hello, Any inputs or query required, let us know how to check further |
Hi we have try sftp alone in our machine its working, see the logs sftp -v root@10.68.196.252 <<EOFput /root/prabhat/test /root/sankar And same way we tried with sftp curl its not working. see the logs below curl -v -T /root/prabhat/test sftp://root@10.68.196.252/root/sankar
so with curl sftp only its not working in our machine. |
The original issue was about an authentication problem, but this last log shows authentication working, but the upload failing. I'm not able to reproduce this using curl and libssh2 from head writing a 261120 byte file to a OpenSSH 9.3 server. |
actually we are using curl api functions like curl_easy_setopt and curl_easy_perform functions to transfer the file using SFTP. We are trying the same operation with FTP, HTTP and SFTP. All the setopt are same, and with curl_easy_perform FTP.HTTP is success and SFTP is failing. Snapshot from logs is: The value of ulr with encode ftp://[2a00:8a00:8000:147:0:4:196:252]:21/OMSFTPVerify.testfile The value of ulr with encode sftp://[2a00:8a00:8000:147:0:4:196:252]:22/OMSFTPVerify.testfile The value of ulr with encode http://[2a00:8a00:8000:147:0:4:196:252]:80/OMSFTPVerify.testfile In above snapshot, you can see that only the protocol type and port number are changed. Not sure why curl_easy_perform is saying access denied. We are using password authentication method here. |
I did this
when we transfer file using SFTP we are getting error permission denied in remote resources(9). we have used SETOPT for FILE and DIR access for SFTP. but its not success.
I expected the following
file transfer should be happen when we transfer the file using SFTP
curl/libcurl version
CURL 8.7.1
operating system
RHEL 9
The text was updated successfully, but these errors were encountered: