mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
8cf9ac82e2
commit
40c6bb57e3
1 changed files with 20 additions and 3 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue