Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using C++ or C or Java, Please perform the following (thank you in advance!) Description You are to write a remote shell system, where a
Using C++ or C or Java, Please perform the following (thank you in advance!)
Description You are to write a remote shell system, where a server process resides on another machine on the network and the user provides commands to the server via a client process on a local machine. The client sends the commands to the server, the server executes them, and sends the output back to the client. A main goal of this part is to re-enforce some system calls and process manipulation facilities from an Operating System. Then, provide a basic introduction to OS support for sockets, while building upon some of your previous OS knowledge. You will write a basic remote shell in which a user specifies an arbitrary shell command to be executed, and it is sent over socket connection and executed on a remote server. You will write a server and a client: Server: The server will run on the remote machine. It will bind to a Unix socket at a port known to the client. When it reccives a connection, it fork)s a child process to handle the connection. The parent process loops back to wait for more connections. The child process first verifies that the client is valid via a (clear-text) password. Then, it executes the given shell command, returning all stdout and stderr to the client. The server can assume the shell command does not use stdin. Upon completing the command, the server will exit Client: The client will run on the local machine. From the command line, the user will specify the host 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" shel Description You are to write a remote shell system, where a server process resides on another machine on the network and the user provides commands to the server via a client process on a local machine. The client sends the commands to the server, the server executes them, and sends the output back to the client. A main goal of this part is to re-enforce some system calls and process manipulation facilities from an Operating System. Then, provide a basic introduction to OS support for sockets, while building upon some of your previous OS knowledge. You will write a basic remote shell in which a user specifies an arbitrary shell command to be executed, and it is sent over socket connection and executed on a remote server. You will write a server and a client: Server: The server will run on the remote machine. It will bind to a Unix socket at a port known to the client. When it reccives a connection, it fork)s a child process to handle the connection. The parent process loops back to wait for more connections. The child process first verifies that the client is valid via a (clear-text) password. Then, it executes the given shell command, returning all stdout and stderr to the client. The server can assume the shell command does not use stdin. Upon completing the command, the server will exit Client: The client will run on the local machine. From the command line, the user will specify the host 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" shelStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started