2016-12-27 51 views
0

我需要从使用ssh密钥进行身份验证的Linux服务器获取配置文件。我被卡住了“Callback returned error”消息。RCurl SSH公钥认证失败:回调返回错误

conf = scp(host="10.10.10.10", path="/home/admin/codebase/config.txt", 
     user="admin", keypasswd = "", verbose=TRUE, 
     key=c("C:/echinn/.ssh/my_public_key", "C:/echinn/.ssh/my_private_key")) 

我得到以下输出

* Trying 10.10.10.10... 
* Connected to 10.10.10.10 (10.10.10.10) port 22 (#0) 
* SSH MD5 fingerprint: 8fa4562037d2f1e68c7ff419f9dc7656 
* SSH authentication methods available: publickey,gssapi-keyex,gssapi-with-mic 
* Using SSH public key file 'C:/echinn/.ssh/my_public_key' 
* Using SSH private key file 'C:/echinn/.ssh/my_private_key' 
* SSH public key authentication failed: Callback returned error 
* Failure connecting to agent 
* Authentication failure 
* Closing connection 0 
Error in function (type, msg, asError = TRUE) : Authentication failure 

我也试图与 “的getURL()”,但结束了同样的错误。我能够使用putty和WinSCP与(.ppk格式)相同的公钥/私钥成功连接。

在Linux服务器的/ var /日志/安全我看到每个执行

sshd[xxxx]: Connection closed by x.x.x.x [preauth] 

回答

相关问题