'Unable to upload file by using curl through SFTP on redhat8

I faced this error "curl: (9) Access denied to remote resource" on redhat 8 after using the command

**curl -k -v --insecure -T {file} sftp://demo1:{password}@{ip}/**

Howerver, it can work on redhat 7 with the same command. I have no idea why redhat 7 can work but redaht 8 didn't work?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source