ssh2_auth_password
ssh2_auth_password — SSH 上でプレーンなパスワードを使用した認証を行う
説明
bool ssh2_auth_password ( resource session, string username, string password )SSH 上でプレーンなパスワードを使用した認証を行います。
例 2199. パスワードを用いた認証
<?php
$connection = ssh2_connect('shell.example.com', 22);
if (ssh2_auth_password($connection, 'username', 'secret')) {
echo "Authentication Successful!\n";
} else {
die('Authentication Failed...');
}
?>
- ssh2_auth_passwordのページへのリンク