Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
RCurl SSH公钥身份验证失败:回调返回错误_R_Ssh_Scp_Rcurl_Geturl - Fatal编程技术网

RCurl SSH公钥身份验证失败:回调返回错误

RCurl SSH公钥身份验证失败:回调返回错误,r,ssh,scp,rcurl,geturl,R,Ssh,Scp,Rcurl,Geturl,我需要从使用ssh密钥进行身份验证的Linux服务器获取配置文件。我被“回调返回错误”消息卡住了 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"

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

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/log/secure上,每次执行我都会看到以下内容

sshd[xxxx]: Connection closed by x.x.x.x [preauth]
,您的密钥似乎没有密码短语,因此请尝试设置
keypasswd=NA
或完全删除参数