mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-26 01:42:09 +01:00
147 lines
4.1 KiB
XML
147 lines
4.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: b8758b0605e80c4e3610137b7502a6abeea5c69b Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ssh2-publickey-add">
|
|
<refnamediv>
|
|
<refname>ssh2_publickey_add</refname>
|
|
<refpurpose>Ajoute une clé publique autorisée</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><initializer>&false;</initializer></methodparam>
|
|
<methodparam choice="opt"><type>array</type><parameter>attributes</parameter></methodparam>
|
|
</methodsynopsis>
|
|
|
|
¬e.ssh2.subsystem.publickey;
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>pkey</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Ressource Publickey Subsystem créée par
|
|
<function>ssh2_publickey_init</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>algoname</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Algorithme de clé publique (exemple) : ssh-dss, ssh-rsa
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>blob</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Blob de clé publique comme données binaires brutes
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>overwrite</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Si la clé spécifiée existe déjà, devrait-elle être écrasée ?
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>attributes</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Tableau associatif d'attributs pour assigner à cette clé publique.
|
|
Référez-vous à ietf-secsh-publickey-subsystem pour une liste des
|
|
attributs supportés. Pour marquer un attribut comme obligatoire,
|
|
précédez son nom par un astérisque. Si le serveur n'est pas capable de
|
|
supporter un attribut marqué comme obligatoire, il abandonnera le
|
|
processus d'ajout.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ajout d'une clé publique avec <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($pkey, 'ssh-rsa', $keyblob, false, array('comment'=>"John's Key"));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>ssh2_publickey_init</function></member>
|
|
<member><function>ssh2_publickey_remove</function></member>
|
|
<member><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:"~/.phpdoc/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
|
|
-->
|