array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.ssh2-auth-none.php', 1 => 'ssh2_auth_none', ), 'up' => array ( 0 => 'ref.ssh2.php', 1 => 'SSH2 関数', ), 'prev' => array ( 0 => 'function.ssh2-auth-hostbased-file.php', 1 => 'ssh2_auth_hostbased_file', ), 'next' => array ( 0 => 'function.ssh2-auth-password.php', 1 => 'ssh2_auth_password', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/ssh2/functions/ssh2-auth-none.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL ssh2 >= 0.9.0)
ssh2_auth_none — "none" として認証する
通常失敗する(そしてそうあるべき)"none" 認証を試みます。 失敗の一環として、サーバーは可能な認証メソッドの一覧を返します。
もしサーバーが username
に対する認証メソッドとして
"none" を受け入れる場合、この関数は単純に true
を返します。
例1 認証メソッドの一覧の取得
<?php
$connection = ssh2_connect('shell.example.com', 22);
$auth_methods = ssh2_auth_none($connection, 'user');
if (in_array('password', $auth_methods)) {
echo "Server supports password based authentication\n";
}
?>