I have setup a aws ec2 linux instnace with sftp server configured.
I am able to send curl command from cli of linux server to aws instance with below command:
curl sftp://username:password@ec2-instance/dir/
But when I use same command from python code as below, it doesn't work
curl_easy_setopt(curl, CURLOPT_UPLOAD, sftp://username:password@ec2-instance/dir);
It says protocol sftp not supported or disabled in curl *closing connection-1 Curl error 1
I am wondering why it works with CLI but not from code. Same is the result when I try with pysftp. Any help would be appreciated. Thanks.