在CentOS5上禁用不推荐使用的密码后,如何使用PHP执行SFTP操作?
我有用于SFTP操作的PHP代码,目前在CentOS5机器上运行良好。 禁用以下不推荐使用的密码后,它停止工作 这是密码列表 密钥交换:diffie-hellman-group1-sha1 密码:arcfour256、arcfour128、3DES cbc、河豚cbc、cast128 cbc、arcfour 下面是当前的代码片段在CentOS5上禁用不推荐使用的密码后,如何使用PHP执行SFTP操作?,php,ssh,sftp,deprecated,centos5,Php,Ssh,Sftp,Deprecated,Centos5,我有用于SFTP操作的PHP代码,目前在CentOS5机器上运行良好。 禁用以下不推荐使用的密码后,它停止工作 这是密码列表 密钥交换:diffie-hellman-group1-sha1 密码:arcfour256、arcfour128、3DES cbc、河豚cbc、cast128 cbc、arcfour 下面是当前的代码片段 $connection = ssh2_connect('ftp_url', 'ftp_port'); 这起作用了。这种方法实际上强制代码使用指定的密码 $method
$connection = ssh2_connect('ftp_url', 'ftp_port');
这起作用了。这种方法实际上强制代码使用指定的密码
$methods = array(
'hostkey' => 'ssh-rsa,ssh-dss',
'client_to_server' => array(
'crypt' => 'aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc',
'comp' => 'none'
),
'server_to_client' => array(
'crypt' => 'aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc',
'comp' => 'none'
)
);
$connection = ssh2_connect( 'ftp_url', 'ftp_port', $methods );
“它停止工作了”这是模糊的。到底发生了什么?你收到错误信息了吗?他们说什么?考虑使用。