2016-12-27 50 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] 

回答

相關問題