Curl fails on sftp password authentication

前端 未结 2 786
梦如初夏
梦如初夏 2021-01-20 08:03

When I manually sftp using username and password it works fine, when using curl it fails. The same script will successfully connect to other servers with no problem. Because

2条回答
  •  深忆病人
    2021-01-20 08:50

    Got it working, turned out to be pretty simple but would only work with the username and password in the url.

    curl -v --insecure sftp://username:urlencodedPassword@somedomain.com
    

    This would not work.

    curl -v --insecure --user username:urlencodedPassword sftp://somedomain.com
    

    Someone who knows more than me could probably elaborate as to why they 2nd one wouldn't work.

提交回复
热议问题