开发者

SFTP using cURL

开发者 https://www.devze.com 2023-02-25 00:05 出处:网络
I am trying to ftp a file via sftp protocol to a client: curl -u username --key C:\\cygwin\\home\\XJ0002T\\.ssh\\id_rsa --pubkey c:\\cygwin\\home\\XJ0002T\\.ssh\\id_rsa.pub -

I am trying to ftp a file via sftp protocol to a client:

curl -u username --key C:\cygwin\home\XJ0002T\.ssh\id_rsa --pubkey c:\cygwin\home\XJ0002T\.ssh\id_rsa.pub -
T c:\temp2\test4.txt sftp://server/SFTP/ --insecure

Enter host p开发者_如何学JAVAassword for user XJ0002T:

Curl keeps asking me for a password. I have tried key pairs using OpenSSH and puttyGen, neither worked. Can someone tell me what I am doing wrong?


Explicitly provide blank password

curl asks you for a password because you use -u and provide a username but no password.

Provide a blank password instead with -u username: (notice the trailing colon) and it will stop asking.

0

精彩评论

暂无评论...
验证码 换一张
取 消