downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ssh2_auth_password> <ssh2_auth_hostbased_file
[edit] Last updated: Fri, 25 May 2012

view this page in

ssh2_auth_none

(PECL ssh2 >= 0.9.0)

ssh2_auth_noneIdentification en tant que "none"

Description

mixed ssh2_auth_none ( resource $session , string $username )

Tente une identification en tant que "none", qui, habituellement, échoue (et doit échouer). Mis à part l'échec, cette fonction doit retourner un tableau contenant les méthodes d'identification acceptées.

Liste de paramètres

session

Un identifiant de connexion SSH, obtenu avec la fonction ssh2_connect().

username

Nom d'utilisateur distant.

Valeurs de retour

Retourne TRUE si le serveur accepte "none" comme méthode d'identification, ou un tableau de méthodes d'identification acceptées en cas d'échec.

Exemples

Exemple #1 Récupération de la liste des méthodes d'identification

<?php
$connection 
ssh2_connect('shell.example.com'22);

$auth_methods ssh2_auth_none($connection'user');

if (
in_array('password'$auth_methods)) {
  echo 
"Le serveur supporte l'identification à mot de passe\n";
}
?>



add a note add a note User Contributed Notes ssh2_auth_none
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites