Forum und email

ssh2_auth_password

(PECL ssh2:0.10-0.9)

ssh2_auth_password — Identification via SSH en utilisant un mot de passe en clair

Description

bool ssh2_auth_password ( resource $session , string $username , string $password )

ssh2_auth_password() tente une identification via SSH en utilisant un mot de passe en clair.

Example#1 Identification avec un mot de passe

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

if (
ssh2_auth_password($connection'username''secret')) {
  echo 
"Identification réussi !\n";
} else {
  die(
'Echec de l\'identification...');
}
?>