I am new to java and need some help.How do I write a java program to develop a server which logs into another machine using ssh?
I have to develop a server that logs into another machine using ssh and executes a command- "free". This server, running on a linux machine(as a normal user) should be able to login to the local machine using ssh with the parameters - username(another user), password and hostname. Once logged in, the server should execute the "free" command to obtain memory utilization and return the results.
The result is the 'grep' ed to display only the appropriate fields.

How do I go about the coding for this. Please help.

And what APIs should I download for this?

Use RMI to devlope Server Client Program.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.