pollita         Thu Jul 21 17:37:49 2005 EDT

  Added files:                 
    /phpdoc/en/reference/ssh2/functions ssh2-publickey-add.xml 
                                        ssh2-publickey-init.xml 
                                        ssh2-publickey-list.xml 
                                        ssh2-publickey-remove.xml 

  Modified files:              
    /phpdoc/en  language-snippets.ent 
  Log:
  Document ssh2 publickey subsystem
  
http://cvs.php.net/diff.php/phpdoc/en/language-snippets.ent?r1=1.151&r2=1.152&ty=u
Index: phpdoc/en/language-snippets.ent
diff -u phpdoc/en/language-snippets.ent:1.151 
phpdoc/en/language-snippets.ent:1.152
--- phpdoc/en/language-snippets.ent:1.151       Wed Jun  8 21:24:28 2005
+++ phpdoc/en/language-snippets.ent     Thu Jul 21 17:37:48 2005
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.151 $ -->
+<!-- $Revision: 1.152 $ -->
 <!-- Keep 'em sorted -->
 
 
@@ -587,3 +587,10 @@
 patched versions of PHP 5.0 and requires that thread safety be enabled.
 See the README file included in the runkit package for more information.
 </simpara></note>'>
+
+<!-- SSH2 Extension -->
+<!ENTITY note.ssh2.subsystem.publickey '<note><simpara>The publickey subsystem
+is used for managing publickeys on a server to which the client is
+<emphasis>already</emphasis> authenticated.  To authenticate to a remote system
+using publickey authentication, use the 
<function>ssh2_auth_pubkey_file</function>
+function instead.</simpara></note>'>

http://cvs.php.net/co.php/phpdoc/en/reference/ssh2/functions/ssh2-publickey-add.xml?r=1.1&p=1
Index: phpdoc/en/reference/ssh2/functions/ssh2-publickey-add.xml
+++ phpdoc/en/reference/ssh2/functions/ssh2-publickey-add.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
<refentry id="function.ssh2-publickey-add">
 <refnamediv>
  <refname>ssh2_publickey_add</refname>
  <refpurpose>
   Add an authorized publickey
  </refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>ssh2_publickey_add</methodname>
   <methodparam><type>resource</type><parameter>pkey</parameter></methodparam>
   <methodparam><type>string</type><parameter>algoname</parameter></methodparam>
   <methodparam><type>string</type><parameter>blob</parameter></methodparam>
   <methodparam 
choice="opt"><type>bool</type><parameter>overwrite</parameter></methodparam>
   <methodparam 
choice="opt"><type>array</type><parameter>attributes</parameter></methodparam>
  </methodsynopsis>

  &note.ssh2.subsystem.publickey;

 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>pkey</parameter></term>
     <listitem>
      <para>
       Publickey Subsystem resource created by 
<function>ssh2_publickey_init</function>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>algoname</parameter></term>
     <listitem>
      <para>
       Publickey algorithm (e.g): ssh-dss, ssh-rsa
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>blob</parameter></term>
     <listitem>
      <para>
       Publickey blob as raw binary
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>overwrite</parameter></term>
     <listitem>
      <para>
       If the specified key already exists, should it be overwritten?
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>attributes</parameter></term>
     <listitem>
      <para>
       Associative array of attributes to assign to this public key.
       Refer to ietf-secsh-publickey-subsystem for a list of supported 
attributes.
       To mark an attribute as mandatory, preceed its name with an asterix.
       If the server is unable to support an attribute marked mandatory,
       it will abort the add process.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <simpara>
    &return.success;
  </simpara>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title>Adding a publickey with 
<function>ssh2_publickey_add</function></title>
    <programlisting role="php">
<![CDATA[
<?php
$ssh2 = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($ssh2, 'jdoe', 'password');
$pkey = ssh2_publickey_init($ssh2);

$keyblob = base64_decode('
AAAAB3NzaC1yc2EAAAABIwAAAIEA5HVt6VqSGd5PTrLRdjNONxXH1tVFGn0
Bd26BF0aCP9qyJRlvdJ3j4WBeX4ZmrveGrjMgkseSYc4xZ26sDHwfL351xj
zaLpipu\BGRrw17mWVBhuCExo476ri5tQFzbTc54VEHYckxQ16CjSTibI5X
69GmnYC9PNqEYq/1TP+HF10=');

ssh2_publickey_add($ssh2, 'ssh-rsa', $keyblob, false, array('comment'=>"Jhon's 
Key"));
?>
]]>
    </programlisting>
   </example>
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>ssh2_publickey_init</function></member>
    <member><function>ssh2_publickey_remote</function></member>
    <member>Or <function>ssh2_publickey_list</function></member>
   </simplelist>
  </para>
 </refsect1>


</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

http://cvs.php.net/co.php/phpdoc/en/reference/ssh2/functions/ssh2-publickey-init.xml?r=1.1&p=1
Index: phpdoc/en/reference/ssh2/functions/ssh2-publickey-init.xml
+++ phpdoc/en/reference/ssh2/functions/ssh2-publickey-init.xml
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
  <refentry id="function.ssh2-publickey-init">
   <refnamediv>
    <refname>ssh2_publickey_init</refname>
    <refpurpose>
     Initialize Publickey subsystem
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <methodsynopsis>
     <type>resource</type><methodname>ssh2_publickey_init</methodname>
     
<methodparam><type>resource</type><parameter>session</parameter></methodparam>
    </methodsynopsis>

    <simpara>
     Request the Publickey subsystem from an already connected SSH2 server.
    </simpara>

    &note.ssh2.subsystem.publickey;

    <simpara>
     This method returns an <literal>SSH2 Publickey Subsystem</literal>
     resource for use with all other ssh2_publickey_*() methods.
    </simpara>

    <simpara>
     The publickey subsystem allows an already connected and authenticated
     client to manage the list of authorized public keys stored on the
     target server in an implementation agnostic manner.
     If the remote server does not support the publickey subsystem,
     the <function>ssh2_publickey_init</function> function will return &false;.
    </simpara>

    <simpara>
     See Also:
     <function>ssh2_publickey_add</function>,
     <function>ssh2_publickey_remove</function>, and
     <function>ssh2_publickey_list</function>
    </simpara>

   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

http://cvs.php.net/co.php/phpdoc/en/reference/ssh2/functions/ssh2-publickey-list.xml?r=1.1&p=1
Index: phpdoc/en/reference/ssh2/functions/ssh2-publickey-list.xml
+++ phpdoc/en/reference/ssh2/functions/ssh2-publickey-list.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
<refentry id="function.ssh2-publickey-list">
 <refnamediv>
  <refname>ssh2_publickey_list</refname>
  <refpurpose>
   List currently authorized publickeys
  </refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>array</type><methodname>ssh2_publickey_list</methodname>
   <methodparam><type>resource</type><parameter>pkey</parameter></methodparam>
  </methodsynopsis>

  &note.ssh2.subsystem.publickey;

 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>pkey</parameter></term>
     <listitem>
      <para>
       Publickey Subsystem resource
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns a numericly indexed array of keys,
   each of which is an associative array containing:
   name, blob, and attrs elements.
  </para>
  <para>
   <table>
    <title>Publickey elements</title>
    <tgroup cols="3">
     <thead>
      <row>
       <entry>Array Key</entry>
       <entry>Meaning</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry>name</entry>
       <entry>Name of algorithm used by this publickey, for example:
              <literal>ssh-dss</literal> or <literal>ssh-rsa</literal>.</entry>
      </row>
      <row>
       <entry>blob</entry>
       <entry>Publickey blob as raw binary data.</entry>
      </row>
      <row>
       <entry>attrs</entry>
       <entry>Attributes assigned to this publickey.
              The most common attribute, and the only one supported by
              publickey version 1 servers, is <literal>comment</literal>,
              which may be any freeform string.</entry>
      </row>
     </tbody>
    </tgroup>
   </table>
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title>Listing authorized keys with 
<function>ssh2_publickey_list</function></title>
    <programlisting role="php">
<![CDATA[
<?php
$ssh2 = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($ssh2, 'jdoe', 'secret');
$pkey = ssh2_publickey_init($ssh2);

$list = ssh2_publickey_list($pkey);

foreach($list as $key) {
  echo "Key: {$key['name']}\n";
  echo "Blob: " . chunk_split(base64_encode($key['blob']), 40, "\n") . "\n";
  echo "Comment: {$key['attrs']['comment']}\n\n";
}
?>
]]>
    </programlisting>
    &example.outputs;
    <screen>
<![CDATA[
Key: ssh-rsa
Blob: AAAAB3NzaC1yc2EAAAABIwAAAIEA5HVt6VqSGd5P
TrLRdjNONxXH1tVFGn0Bd26BF0aCP9qyJRlvdJ3j
4WBeX4ZmrveGrjMgkseSYc4xZ26sDHwfL351xjza
Lpipu\BGRrw17mWVBhuCExo476ri5tQFzbTc54VE
HYckxQ16CjSTibI5X69GmnYC9PNqEYq/1TP+HF10
Comment: John's Key

Key: ssh-rsa
Blob: AAAAB3NzaHVt6VqSGd5C1yc2EAAAABIwA232dnJA
AIEA5HVt6VqSGd5PTrLRdjNONxX/1TP+HF1HVt6V
qSGd50H1tVFGn0BB3NzaC1yc2EAd26BF0aCP9qyJ
RlvdJ3j4WBeX4ZmrveGrjMgkseSYc4xZ26HVt6Vq
SGd5sDHwfL351xjzaLpipu\BGB3NzaC1yc2EA/1T
Comment: Alice's Key

]]>
    </screen>
   </example>
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>ssh2_publickey_init</function></member>
    <member><function>ssh2_publickey_add</function></member>
    <member>Or <function>ssh2_publickey_remove</function></member>
   </simplelist>
  </para>
 </refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

http://cvs.php.net/co.php/phpdoc/en/reference/ssh2/functions/ssh2-publickey-remove.xml?r=1.1&p=1
Index: phpdoc/en/reference/ssh2/functions/ssh2-publickey-remove.xml
+++ phpdoc/en/reference/ssh2/functions/ssh2-publickey-remove.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
<refentry id="function.ssh2-publickey-remove">
 <refnamediv>
  <refname>ssh2_publickey_remove</refname>
  <refpurpose>
   Remove an authorized publickey
  </refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>ssh2_publickey_remove</methodname>
   <methodparam><type>resource</type><parameter>pkey</parameter></methodparam>
   <methodparam><type>string</type><parameter>algoname</parameter></methodparam>
   <methodparam><type>string</type><parameter>blob</parameter></methodparam>
  </methodsynopsis>

  &note.ssh2.subsystem.publickey;

 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>pkey</parameter></term>
     <listitem>
      <para>
       Publickey Subsystem Resource
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>algoname</parameter></term>
     <listitem>
      <para>
       Publickey algorithm (e.g.): ssh-dss, ssh-rsa
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>blob</parameter></term>
     <listitem>
      <para>
       Publickey blob as raw binary data
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <simpara>
    &return.success;
  </simpara>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>ssh2_publickey_init</function></member>
    <member><function>ssh2_publickey_add</function></member>
    <member>Or <function>ssh2_publickey_list</function></member>
   </simplelist>
  </para>
 </refsect1>


</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

Reply via email to