(PECL ssh2 >= 0.9.0)
ssh2_auth_none — Identification en tant que "none"
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.
session
Un identifiant de connexion SSH, obtenu avec la fonction ssh2_connect().
username
Nom d'utilisateur distant.
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.
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";
}
?>
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant