Curl fails on sftp password authentication

前端 未结 2 785
梦如初夏
梦如初夏 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:40

    thanks and for publickey authentication :

    curl -v -k --pubkey ~/.ssh/id_rsa.pub sftp://username@host/
    
    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题