curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

What Am I Doing Wrong With cURL and SFTP?

From: Michael Newman via curl-users <curl-users_at_cool.haxx.se>
Date: Mon, 24 Aug 2020 14:45:15 +0700

This works:

pi_at_raspsky:~/webcam $ sftp mgnewman_at_ftp.myhost.com
Connected to mgnewman_at_ftp.myhost.com.
sftp> put testxx.jpg
Uploading testxx.jpg to /home3/mgnewman/testxx.jpg
testxx.jpg 100% 52KB 58.6KB/s 00:00

This doesn't:

pi@raspsky:~/webcam $ curl -k -u mgnewman: --key ~/.ssh/id_rsa --pubkey ~/.ssh/id_rsa.pub sftp://ftp.myhost.com/ -T "testxx.jpg"
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0
curl: (9) Upload failed: Permission denied (3/-31)

What have I done wrong?

Mike Newman
Korat, Thailand
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-08-24