0
我使用curl --insecure --user user1:password1 -T test.txt sftp://company1.com/incoming/ -vvv
将我的文件发送到SFTP。使curl使用密码auth而不是公钥认证
在输出我看到
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying xxx.xxx.xxx.xxx...
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0* Connected to transfer.dotz.com.br (xxx.xxx.xxx.xxx) port 22 (#0)
0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0* SSH MD5 fingerprint: 1954076a7e4299f00df823fa1ca2d30e
0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* SSH authentication methods available: password,publickey
* Using SSH public key file '(nil)'
* Using SSH private key file '/home/ec2-user/.ssh/id_rsa'
* SSH public key authentication failed: Username/PublicKey combination invalid
* Failure connecting to agent
* Authentication failure
0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0
* Closing connection 0
curl: (67) Authentication failure
我不明白为什么它抱怨的“SSH公钥验证失败”,而我明确表示--user
说法。显然我的密码没有使用...
你能帮忙吗?
我试过,SFTP://用户1:[email protected]失败,同样的结果 – snowindy