SSH Key Management
2 min
Generate New Ssh Key Pair
POST
http://{{hostname}}/aioc-rest-web/rest/sc/ssh/generateNewSshKeyPair
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/sc/ssh/generateNewSshKeyPair");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Retrieve Ssh Key Pair
GET
http://{{hostname}}/aioc-rest-web/rest/sc/ssh/retrieveSshKeyPair
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/sc/ssh/retrieveSshKeyPair");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "{{netrightCookie}}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Update Ssh Key Pair
POST
http://{{hostname}}/aioc-rest-web/rest/sc/ssh/updateSshKeyPair
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/sc/ssh/updateSshKeyPair");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Cookie", "{{netrightCookie}}");
request.AddParameter("text/plain", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCT0z1soO5j6g4mYJM2E79hjGRAiUWC2E8/On8dj/8TU/A+LDQvtXAiCE878uk0QHcugQGJ6tju4UKJMZc59Cs44t68/J0pcrWRi8wWyx5MALPULhEeDQ29d5540ihI9hsSDTKBcYj0VzPtFlaLEWL/EZdJWVbGUYNAzNXb92odCGpicQAagykXqzzi6a7Fk77jNl7hK4eUeyXZRxM6GAfk7HPzYZvoX+EsfAQXF3BeV2dQUTVt1Wx+mGUDoD9SopuxNg5Io1pDcklhQwt33Ts2HgdbQAzy+69DSi/D5bMjtbAVFVtZk9Uf3LA7g3sLVQ1lDKAnRPqdIdrT0DgSoPFX admin", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Delete Ssh Key Pair
DELETE
http://{{hostname}}/aioc-rest-web/rest/sc/ssh/deleteSshKeyPair/USERID
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/sc/ssh/deleteSshKeyPair/a177be61-8850-4f03-be1c-3ce275f02c1f");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
request.AddParameter("text/plain", "", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);