Remote Servers

Top  Previous  Next

SUMMARY

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

remote machine.

 

SCRIPT

/usr/ngasi/apiclient/bin/ncli.sh -user=admin -password=coolgeek -url=http://localhost:8666 -command=addremoteserver -host=xxx.myserver.com -remoteserverid=rserver1 -authmethod=password[publickey,privatekey] -remoteserverpassword=tiger [-privatekeyinputfile=in.key] [-remotetype=linux -port=22]

 

JAVA API

Properties properties = new Properties();

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

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

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

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

properties.put("host","xxx.myserver.com");

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

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

properties.put("remoteserverpassword","tiger");

//publickey requires calling the generateremoteserverpk prior.

//properties.put("authmethod","publickey");

//properties.put("authmethod","privatekey");

//properties.put("privatekeyinputfile","in.key");

//properties.put("port","22");

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

String result = NGAPIClient.exec(properties);