Question: Language C++ You are to write a remote shell system, where a server process can reside on another machine on the network and the user
Language C++
You are to write a remote shell system, where a server process can reside on another machine on the network and the user provides commands to the server via a client process on a local linux machine. The client sends the commands to the server, the server executes them, and sends the output back to the client.
You will write a server, a client and a program that is used by the server to execute commands (let's call it the executer) and send the results back to the client:
Server: The server will run on the remote machine. It will bind to a Unix socket at a port, given as an argument using -p
Executer: The server will exec this program which will execute the command and communicate back with the client so that the server can continue accepting connections. This program will fork and exec the command that the client sent and return the stdout and stderr to the client. The server can assume the shell command does not use stdin. Upon command completion, the server will send the result back to the client to output.
Client: The client will run on the local machine. From the command line, the user will specify the host and port where the server resides and the command to be executed. The client will then connect to the server via a socket and transmit the password and the command. The client will display any output received from the server to the stdout and then exit. Thus, the client does one command at a time and is not an "interactive" shell.
Each component should produce enough output (to a logfile) to understand what is going on in that program.
You will design experiments to evaluate some basic performance parameters of your remote shell:
Determine the minimum response time (measured in milliseconds) between your client entering a command and the server returning the response.
Determine the throughput (measured in Kbytes per second) from the client to the server.
Compare the throughput with your client server to the throughput by another bulk-transfer program, such as ftp or wget.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
