Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/240.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
Php 在ssh2_connect中使用客户端到服务器MAC算法hmac-sha2-256_Php_Ssh_Sftp - Fatal编程技术网

Php 在ssh2_connect中使用客户端到服务器MAC算法hmac-sha2-256

Php 在ssh2_connect中使用客户端到服务器MAC算法hmac-sha2-256,php,ssh,sftp,Php,Ssh,Sftp,我正在尝试连接到我的SFTP服务器(prosftpd),但当我检查其日志时,我发现: 2018-04-19 11:00:48303 mod_sftp/0.9.9[18488]:未找到共享的客户端到服务器MAC算法(客户端发送'hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,hmac-ripemd160,hmac-ripemd160@openssh.com'服务器已发送'hmac-sha2-256,hmac-sha2-512,umac-64@openssh.

我正在尝试连接到我的SFTP服务器(prosftpd),但当我检查其日志时,我发现:

2018-04-19 11:00:48303 mod_sftp/0.9.9[18488]:未找到共享的客户端到服务器MAC算法(客户端发送'hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,hmac-ripemd160,hmac-ripemd160@openssh.com'服务器已发送'hmac-sha2-256,hmac-sha2-512,umac-64@openssh.com")

我尝试使用“方法”参数:

ssh2_connect("my-sftp-server.com", 443, array(
    "client_to_server" => array(
      "mac" => 'hmac-sha2-256,hmac-sha2-512,umac-64@openssh.com'
但是它不起作用,似乎这个算法不受方法
ssh2\u connect
的支持,在我的日志中我可以看到

客户发送了“hmac-sha1、hmac-sha1-96、hmac-md5、hmac-md5-96、hmac-ripemd160、hmac-ripemd160@openssh.com"

有没有办法在我的PHP SFTP客户端上安装新的MAC算法?

使用

对于
hmac-sha2-256
hmac-sha2-512
,您需要(2016-02-23)或更高版本。不支持
umac-64@openssh.com


或者,您可以使用,它支持自2014年9月12日起的
hmac-sha2-256
。不支持
hmac-sha2-512
,也不支持
umac-64@openssh.com