Secure Exam Terminal

A locked-down terminal/SSH client designed for secure exam environments

Note: This project was developed with AI assistance using OpenCode.

Features

Installation

Install dependencies:

npm install

Configuration

Copy the example configuration file:

cp exam-config.example.json exam-config.json

Edit exam-config.json to configure the exam environment:

{
  "allowedHosts": [
    {
      "host": "exam-server.university.edu",
      "port": 22,
      "description": "Main exam server"
    }
  ],
  "sessionDuration": 7200,
  "maxTabs": 2,
  "allowCopyPaste": false,
  "recordSession": true,
  "sessionRecordingPath": "./sessions",
  "requirePassword": true,
  "adminPassword": "your-secure-password-here",
  "exitMessage": "Exam session ended. Please close the application.",
  "warnings": {
    "5min": true,
    "1min": true
  }
}

Important: Never commit exam-config.json to version control as it contains sensitive passwords and server information. Use exam-config.example.json as a template.

Configuration Options

Usage

For Administrators

  1. Copy the example configuration:
    cp exam-config.example.json exam-config.json
  2. Configure exam-config.json with your exam servers and settings
  3. Set a secure admin password:
    "adminPassword": "your-secure-password"
  4. Start the application:
    npm start
  5. To exit during testing:
    • Press F12 or Cmd+Q (macOS) / Ctrl+Q (Windows/Linux)
    • Click the red "Exit" button in the header
    • Enter the admin password

For Students

  1. Launch the Secure Exam Terminal application
  2. Select the exam server from the dropdown
  3. Enter your credentials
  4. Click "Connect"
  5. Working with Multiple Tabs:
    • Click the + button or press Ctrl+T to open a new tab (up to 2 tabs)
    • Switch between tabs using Ctrl+1 and Ctrl+2
    • Click the × on a tab to close it (requires confirmation)
    • Each tab runs an independent SSH session to the same server
  6. Complete your exam tasks
  7. The session will automatically end when time expires

Building

Local Build

Build platform-specific executables locally:

# macOS
npm run build:mac

# Windows
npm run build:win

# Linux
npm run build:linux

# All platforms
npm run build

Executables will be in the dist/ directory.

Automated Releases (GitHub Actions)

The repository includes a GitHub Actions workflow that automatically builds binaries for all platforms when you create a release tag.

To create a new release:

  1. Update version in package.json
  2. Commit the changes
  3. Create and push a git tag:
    git tag v1.0.0
    git push origin v1.0.0
  4. GitHub Actions will automatically:
    • Build binaries for macOS, Windows, and Linux
    • Create a GitHub release
    • Upload all binaries to the release

Download releases:

Pre-built binaries are available on the Releases page.

Keyboard Shortcuts

Student Shortcuts (Enabled)

Admin Shortcuts

Security Features

Blocked Shortcuts

The following shortcuts are blocked to prevent students from exiting or switching applications:

Additional Protections

Troubleshooting

Student cannot connect

Cannot exit the application

Tab-related issues

Session logs not being created

Credits

This project was developed with AI assistance using OpenCode.

License

MIT