Submissions repository for ASOC17 - HTTP-SSH App
Note
All discussions regarding ASOC17: HTTP-SSH App shall take place in https://github.com/orgs/acm-avv/discussions/17.
@Ashrockzzz2003
"Name": "Ashwin Narayanan S",
"Year": "Alumni",
"Roll": "CB.EN.U4CSE21008",
"GitHub": "@Ashrockzzz2003",This project aims to develop a remote shell system that allows users to execute operating system commands on a remote server machine using standard web technologies. Unlike traditional SSH, all communication for commands and their outputs will be facilitated over the HTTP protocol.
- Prerequisites
- Node.js (v14 or higher)
- npm or yarn package manager
- Rust (for backend)
- Git
- Frontend Installation
-
Clone the repository: git clone https://github.com/codervaruns/http-ssh.rfc.git cd http-ssh.rfc/frontend
-
Install frontend dependencies: npm install
-
Start development server:
- npm start
- Frontend will be available at: http://localhost:3001
-
Frontend Configuration
- Default backend WebSocket URL: ws://localhost:8080/ws
- Connection URL can be modified in the application interface
-
Backend Installation
-
Navigate to backend directory: cd http-ssh.rfc/backend
-
Build and run the Rust backend: cargo build cargo run
-
-
Default Settings
- Frontend: Port: 3001
-
Production Deployment
- To create production build: cd frontend npm run build
-
Testing the Connection
- Start backend server
- Launch frontend application
- Verify WebSocket URL matches backend
- Click connect button
- Use terminal interface for commands
-
System Requirements
- OS: Windows/Linux/MacOS
- Modern web browser with WebSocket support
- Sufficient permissions for system commands
- Remote Command Execution: Enable users to run shell commands on a distant server.
- HTTP-Based Communication: Utilize HTTP for transmitting commands from the client to the server and for sending command outputs back to the client.
- Mimics SSH: Provide a similar user experience to SSH for remote command execution, but built entirely with web standards.
- Server Application (Go or Python or any language):
- Runs on the target remote machine.
- Listens for incoming HTTP requests containing commands.
- Executes received commands using the operating system's shell.
- Captures the command's standard output (stdout), standard error (stderr), and return code.
- Packages the output and sends it back to the client via HTTP responses.
- Client User Interface (Web Page):
- A web-based interface accessible via a browser.
- Allows users to input shell commands.
- Sends these commands to the server using HTTP requests
- Receives and displays the command output (stdout, stderr, return code) from the server.
- Technological Approach:
- Protocol: HTTP for all client-server communication.
- Server-Side: Command execution and HTTP handling.
- Client-Side: Standard web technologies (HTML, CSS, JavaScript) for the user interface.
This system provides a flexible and web-friendly alternative for remote command execution, leveraging the widespread accessibility and capabilities of HTTP.


