亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: php 與ssh擴(kuò)展的問(wèn)題 [打印本頁(yè)]

作者: rainbow125    時(shí)間: 2009-04-20 12:20
標(biāo)題: php 與ssh擴(kuò)展的問(wèn)題
我在win XP 下,怎么也不成功啊。。php 5.2.3 ,apache 2.2.11
ssh2_connect(): Unable to connect to ,總是這錯(cuò)誤,有哪位大蝦幫幫忙啊,偶在網(wǎng)上翻了好久了。。未果啊。。
作者: bs    時(shí)間: 2009-04-20 19:10
你是怎么安裝擴(kuò)展的?

phpinfo()
作者: ws00377531    時(shí)間: 2009-04-21 18:12
windows不成功 就先換一個(gè) *nix下的試試啊
作者: HonestQiao    時(shí)間: 2009-04-22 23:55
<?php
/* Notify the user if the server terminates the connection */
function my_ssh_disconnect($reason, $message, $language) {
  printf("Server disconnected with reason code [%d] and message: %s\n",
         $reason, $message);
}

$methods = array(
  'kex' => 'diffie-hellman-group1-sha1',
  'client_to_server' => array(
    'crypt' => '3des-cbc',
    'comp' => 'none'),
  'server_to_client' => array(
    'crypt' => 'aes256-cbc,aes192-cbc,aes128-cbc',
    'comp' => 'none'));

$callbacks = array('disconnect' => 'my_ssh_disconnect');

$connection = ssh2_connect('admin.oursite.com', 22, $methods, $callbacks);
if (!$connection) die('Connection failed');
var_dump($connection);
?>

以上代碼,原版抄襲于手冊(cè),(鏈接地址沒(méi)有),結(jié)果如下:
---------- PHP5 代碼調(diào)試 ----------
resource(4) of type (SSH2 Session)

輸出完畢 (耗時(shí) 2 秒) - 正常終止




歡迎光臨 Chinaunix (http://72891.cn/) Powered by Discuz! X3.2