Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mini SSH (Testing Version)

This is a mini SSH-like tool for learning and testing purposes only. It includes a client and a server written in Python.

Warning: This is only for testing on your own machines. Do not expose to the public internet or run on important servers.


Files

  • server.py – the server program that listens for connections and executes commands
  • sshh – the client program that connects to a server and allows sending commands

Setup Instructions

On the Server (remote machine)

  1. Make sure Python 3 is installed:
python3 --version
  1. Run the server:
python3 server.py

The server will start listening on port 2222 (default). You should see:

Listening on port 2222...
  1. Keep the server running while clients connect.

  2. Optionally, if using a cloud server (AWS, Lightsail, etc.), open TCP port 2222 in the firewall.

On the Client (local machine / your laptop)

  1. Make sure Python 3 is installed:
python3 --version
  1. Make the client executable:
chmod +x sshh
  1. Move it to a directory in your PATH to run easily (optional):
sudo mv sshh /usr/local/bin/sshh
  1. Connect to the server:
sshh <user>@<server-ip>

Example:

sshh ubuntu@192.168.1.10
  1. Type commands in the client. The server will execute them and return the output.

  2. To exit, type:

exit

Example Session

Client:

$ sshh ubuntu@192.168.1.10
Connected to 192.168.1.10:2222
192.168.1.10> ls
projects
server.py
192.168.1.10> whoami
ubuntu
192.168.1.10> exit
Connection closed

Server Output:

Listening on port 2222...
Connected from ('192.168.1.2', 54321)
Client command: ls
Client command: whoami
Client command: exit
Connection closed

Notes

  • This mini SSH is for testing and learning purposes only.
  • Do not run as root or on production servers.
  • Commands are executed with the privileges of the server user running the program.
  • Works best on a private network or a VM.

Optional Improvements

  • Add multiple client support using threads
  • Add a whitelist of allowed commands for safety
  • Add authentication with passwords or keys
  • Customize the client with banners or colors

About

A lightweight SSH-like remote shell tool built with Python TCP sockets • Execute commands remotely • Client-Server architecture

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages