How can I connect a Servlet to a remote UNIX server and interact with the UNIX command line, just as with the Telnet/SSH protocols?

For example, I would like an Servlet to connect to a remote UNIX machine, login with the user's username & password, and then issue standard UNIX commands, such as moving files, running programs etc....

What's the best way to do this, please? Ultimately there will be multiple users of the facility, so I may need to pool several remote connections to the UNIX server, but for the moment I would just like to know how to create a single connection?

Thankyou very much for your help!