downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<ssh2_auth_nonessh2_auth_pubkey_file>
Last updated: Thu, 26 Jun 2008

ssh2_auth_password

(PECL ssh2:0.10-0.9)

ssh2_auth_password — Authenticate over SSH using a plain password

Description

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

Authenticate over SSH using a plain password

Parameters

session

An SSH connection link identifier, obtained from a call to ssh2_connect().

username

Remote user name.

password

Password for username

Return Values

Returns TRUE on success or FALSE on failure.

Examples

Example #1 Authenticating with a password

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

if (
ssh2_auth_password($connection, 'username', 'secret')) {
  echo
"Authentication Successful!\n";
} else {
  die(
'Authentication Failed...');
}
?>



add a noteadd a note User Contributed Notes
Authenticate over SSH using a plain password
There are no user contributed notes for this page.




<ssh2_auth_nonessh2_auth_pubkey_file>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs