您可以安全地从一个SSH服务器使用SFTP抢文件:
curl -u username sftp://server1.cyberciti.biz/path/to/file.txt
OR(注〜意味着您的$ HOME)
curl -u vivek sftp://home1.cyberciti.biz/~/docs/resume.pdf
您可以使用SCP从SSH服务器使用私钥获取文件进行身份验证。
的语法是:
curl -u username: --key ~/.ssh/id_rsa --pubkey ~/.ssh/id_rsa.pub scp://home1.cyberciti.biz/~/Videos/rhn_register.ogv
凡
`-u username` - Specify the user name (and optional password) to use for server authentication.
`-u username:password` - Specify the user name (and optional password) to use for server authentication.
`--key ~/.ssh/id_rsa` - SSL or SSH private key file name. Allows you to provide your private key in this separate file.
`--pubkey ~/.ssh/id_rsa.pub` - SSH Public key file name. Allows you to provide your public key in this separate file.
scp://home1.cyberciti.biz/~/Videos/rhn_register.ogv - Use scp protocol and download file from my home server called home1.cyberciti.biz.