List SSH Keys


This article provides a guide for a VPS Reseller user to list SSH keys via API.

Use List SSH keys API to get the available SSH keys on VPS of your server.

HTTP Request

https://vm1.apivps.com:4083/index.php?act=sshkeys

Parameters

Name Type Value Description Required
act GET sshkeys The action which will return data belonging to a particular page. Yes

Sample Code

PHP

<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');
    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'host_ip';

    $v = new Virtualizor_Enduser_API($ip, $key, $pass);	
    $vps = $v->sshkeys();
	
    print_r(json_encode($vps));
?>

Curl

curl -k -L "https://vm1.apivps.com:4083/index.php?act=sshkeys&api=json&apikey=your_api_key&apipass=your_api_pass"

Output

{
   "uid":"600",
   "act":"sshkeys",
   "timezone":2,
   "timenow":"June 6, 2023, 2:10 am",
   "vpsid":"6710",
   "username":"a@a.com",
   "user_type":"2",
   "preferences":{
      "fname":"",
      "lname":"",
      "theme":"default",
      "language":"english",
      "timezone":2
   },
   "url":"index.php?",
   "rdns":{
      "pdnsid":null
   },
   "support_link":"http:\/\/radwebhosting.com",
   "enable_eu_iso":1,
   "billing_symbol":"$",
   "enable_registration":0,
   "inhouse_billing":"0",
   "title":"KVMTestServer",
   "ssh_keys":[
      {
         "keyid":"6",
         "uuid":"7bapapmgvucbsclk",
         "name":"test"
      }
   ],
   "time_taken":"0.089"
}

Conclusion

You now know how to list SSH keys as a VPS Reseller for use with VPS servers.

  • ssh keys, vps api, api, ssh
  • 0 Usuários acharam útil
Esta resposta lhe foi útil?

Related Articles

Add SSH Key

This article provides a guide for a VPS Reseller user to add SSH key via API. Use Add SSH key...

Cloud Resources

This article provides a guide for a VPS Reseller user to get cloud resources available to the...

Delete VM

This article provides a guide for a VPS Reseller user to delete VM via API. Use Delete VM API to...

Add ISO

This article provides a guide for a VPS Reseller user to add a new ISO to a VPS via API. Use Add...

Create API Credentials

This article provides a guide for how to create API credentials from the Cloud Panel. Create API...