i am running curl on windows 7, and would like see if as opposed to username/pwd i can just use a private key for authentication. can someone show me how to do this?
i tried doing this:
1) use cygwin to do ssh-keygen -t rsa
$ ssh server "mkdir .ssh; chmod 0700 .ssh"
$ scp .ssh/id_rsa.pub server:.ssh/authorized_key
s2
2) C:\Users\mlam\Downloads\Cu
rl>curl --key C:\cygwin\home\mlam\.ssh\i
d_rsa -T c:\temp2\test4.txt s
ftp://servername/var/SFTP/test9.txt
--insecure
but i got this: curl: (67) Authentication failure
can someone help me? also, is it more common to use username/password or to use private key for authentication? thanks.
Didn't you forget to use "-u username"? You still need to select the right username unless your windows username equals the unix username. (normaly cygwin does this mapping for you, but you seem to run curl without cygwin).
Check the auth log on your server to see what failed.
The authlog mostly is in /var/log/auth (YMMV, depending on configuration/syslog logger used).
d_dsa.pub -T c:\temp2\test4.txt s ftp://servername/var/SFTP/test9.txt --insecure
this is the only way i got it to work, which kind of defeats the purpose of having a key pair since i also put in username and password. the :password should not be needed.... (That's the whole pupose of certificates. But the username is needed to signal the remote WHAT directory (based on username) to search for the public user certificate. BTW, I have no windows system myself so i can't test the setup exqctly. On unix systems ssh & friends use the current user as default (as does cygwin).
C:\Users\mlam\Downloads\Cu
Enter host password for user 'mlam':
i also tried:
C:\Users\mlam\Downloads\Cu