This project enables an administrator to centrally manage and control all student PCs in a lab environment using secure SSH connections. It uses a Master-Slave architecture where the Admin PC communicates with multiple Student PCs over a local network.
The system features a GUI for both admin and student sides, built using Python's Tkinter, and leverages Paramiko for SSH and Scapy for network discovery.
- 🖥️ Graphical Interface using
AdminGUI.py
- 🧾 Add or remove MAC addresses and usernames in
user.json
- 📤 Transfer files to all or selected Student PCs
- ⚙️ Execute custom shell commands on:
- All connected Student PCs
- Or only on selected machines
- 🔐 Uses Paramiko for secure SSH-based control
- 🌐 Discovers devices using Scapy (ARP scanning)
- 🖥️ Graphical Interface using
StudentGUI.py
- 🛠️ Automatically configures:
- SSH server installation
- Firewall rules to allow SSH
- 🔐 Add or remove authorized SSH keys via GUI
- 🧹 Simple key cleanup and secure access handling
AdminGUI.py StudentGUI.py User.json
- GUI-based control panel for the Admin.
- Allows adding/removing student MAC addresses in
user.json
. - Performs network scanning using ARP (Scapy).
- Maps active PCs by MAC and username.
- Connects via SSH (Paramiko) to:
- Execute shell commands (on selected or all PCs).
- Transfer files to one or more student systems.
- GUI tool for configuring student PCs.
- Automatically installs and configures SSH server.
- Opens firewall for SSH connections.
- Adds/removes admin’s SSH key to
~/.ssh/authorized_keys
. - Helps in managing key-based secure access without CLI.
- Stores list of student systems in the format:
[
{
"mac": "00:11:22:33:44:55",
"username": "student1"
},
{
"mac": "66:77:88:99:AA:BB",
"username": "student2"
}
]
The Centralized Lab Management System operates in the following stages:
-
Student-Side Setup
Each student PC runs theStudentGUI.py
, which:- Installs and configures the OpenSSH server.
- Opens firewall ports for SSH access.
- Adds or removes the Admin’s public key for secure, passwordless login.
-
Network Scanning and Discovery
The Admin runsAdminGUI.py
, which:- Prompts for the local subnet (e.g.,
192.168.1.0/24
). - Uses Scapy to perform ARP scanning across the subnet.
- Matches active MAC addresses with those in
user.json
to identify valid student PCs.
- Prompts for the local subnet (e.g.,
-
User Mapping and Authentication
- For each matched MAC address, the system maps the IP and username.
- SSH connections are established using Paramiko with key-based authentication (no password required).
-
Remote Operations from Admin GUI
The Admin can:- Execute shell commands on selected or all student PCs.
- Transfer files to one or more systems.
- Add or remove student user details in
user.json
. - Export their public key for configuration on student PCs.
-
Concurrent Execution
- Uses multithreading to handle multiple student PCs simultaneously.
- Ensures faster and non-blocking execution of operations across the lab.