Generate Public Key

Top  Previous  Next

SUMMARY

Adding Remote Servers will allow you to add users for the Application Servers to run under on the

remote machine. Generate Public Key provides a public key for remote server.

For Generated Public Key based authentication method,

copy and paste the Public key info into the following file of the Remote server:

/root/.ssh/authorized_keys2 (or /root/.ssh/authorized_keys)

 

NOTE create directory /root/.ssh if not exists and set directory privilege to 700.

Also set authorized_keys2 privilege to 600.

 

SCRIPT

/usr/ngasi/apiclient/bin/ncli.sh -user=admin -password=coolgeek -url=http://localhost:8666 -command=generateremoteserverpk -remoteserverid=rserver1 [-remotetype=linux]

 

JAVA API

Properties properties = new Properties();

properties.put("url","http://localhost:8666");

properties.put("user","admin");

properties.put("password","coolgeek");

properties.put("command","generateremoteserverpk");

properties.put("remoteserverid","rserver1");

//properties.put("remotetype","linux");

String result = NGAPIClient.exec(properties);