Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 936 Bytes

File metadata and controls

54 lines (39 loc) · 936 Bytes

Remote Shell Server in C++ (TCP + TLS)

A basic remote shell server prototype written in C++ supporting:

  • TCP client/server communication
  • Multi-client handling
  • TLS encryption using OpenSSL

Linux Only

This project is intended to be compiled and run on Linux The following commands are intended for Ubuntu or any Debian-based distribution


Server Side

TCP server

Compile and run the Server

g++ remote_shell_server.cpp -o server
./server

TLS server

  1. Generate a self-signed certificate and key :
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout key.pem -out cert.pem
  1. Compile the server
g++ remote_shell_server.cpp -o server -lssl -lcrypto -lpthread
  1. run server
./server

Client Side

TCP client (netcat required)

nc localhost 8080

TLS client

openssl s_client -connect localhost:8080