Simple example for ssh2_auth_password()

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@175743 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Sara Golemon 2004-12-28 03:17:27 +00:00
parent 8cf9ac82e2
commit 40c6bb57e3

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
<refentry id="function.ssh2-auth-password">
<refnamediv>
@ -17,9 +17,26 @@
<methodparam><type>string</type><parameter>password</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
Authenticate over SSH using a plain password
</para>
</simpara>
<example>
<title>Authenticating with a password</title>
<programlisting role="php">
<![CDATA[
<?php
$connection = ssh2_connect('shell.example.com', 22);
if (ssh2_auth_password($connection, 'username', 'secret')) {
echo "Authentication Successful!\n";
} else {
die('Authentication Failed...');
}
?>
]]>
</programlisting>
</example>
</refsect1>
</refentry>