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 password 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.