Skip to content

Repository files navigation

TerminalMobile

A cyberpunk-styled SSH/Telnet mobile terminal client built with .NET MAUI.

Platform .NET License

Features

🔐 Secure Protocol Support

  • SSH: Full SSH.NET integration for secure shell connections
  • Telnet: Raw TCP socket support for legacy systems
  • Event-driven data streaming with real-time output
  • Async command execution with cancellation support

🎨 Matrix/Cyberpunk Aesthetic

  • Stunning Matrix green (#00FF41) color palette
  • Dark terminal background (#0D0208)
  • Monospace fonts (iOS: Menlo, Android: monospace)
  • Subtle glow effects for authentic terminal feel

📱 Three-Segment Terminal Interface

Segment 1 - Virtual Keyboard

  • Customizable input field with command completion
  • History navigation (↑/↓)
  • Special key support (Ctrl+C, Tab)
  • Context-aware quick commands

Segment 2 - Helper Functions

  • Quick command shortcuts (ls, pwd, top, sudo)
  • Docker commands (docker ps, docker logs, docker exec)
  • Kubernetes commands (kubectl get pods, kubectl logs)
  • Pinnable custom commands

Segment 3 - Terminal Output

  • Real-time streaming output display
  • Auto-scrolling terminal window
  • HTML entity escaping for security
  • Buffer management (last 1000 lines)

🔧 Connection Management

  • Save and manage multiple connection profiles
  • Quick-connect from saved configurations
  • Secure password storage using MAUI SecureStorage
  • Connection history tracking
  • Support for custom tags and organization

⚙️ Responsive Design

  • Adaptive layouts for phone/tablet/large tablet
  • Font size constraints (12-32px) for optimal readability
  • Portrait and landscape orientation support
  • Keyboard-aware layout adjustments

🏗️ Clean Architecture

Layered architecture following SOLID principles:

Presentation/UI → Application → Domain → Infrastructure
  • Presentation: XAML Views, ViewModels (MVVM pattern)
  • Application: Service interfaces, DTOs
  • Domain: Models, Business Logic
  • Infrastructure: SSH/Telnet implementations, Storage

Requirements

Development Environment

  • .NET 9.0 SDK or later
  • Visual Studio 2022 (17.8+) or Visual Studio Code with C# extension
  • .NET MAUI workload installed

iOS Development

  • macOS with Xcode 15.0+
  • iOS 15.0+ deployment target
  • Valid Apple Developer account for device deployment

Android Development

  • Android SDK API 21+ (minimum)
  • Android SDK API 35 (target)
  • Android emulator or physical device

Getting Started

1. Clone the Repository

git clone https://github.com/KotBehamot/TerminalMobile.git
cd TerminalMobile

2. Install .NET MAUI Workload

dotnet workload install maui

3. Restore Dependencies

dotnet restore

4. Build the Project

# For Android
dotnet build src/TerminalMobile/TerminalMobile.csproj -f net10.0-android

# For iOS
dotnet build src/TerminalMobile/TerminalMobile.csproj -f net10.0-ios

5. Run the Application

Using Visual Studio:

  1. Open TerminalMobile.slnx
  2. Select your target platform (Android/iOS)
  3. Select a device or emulator
  4. Press F5 to build and run

Using Command Line:

# Android
dotnet build -t:Run -f net10.0-android

# iOS (requires macOS)
dotnet build -t:Run -f net10.0-ios

Project Structure

TerminalMobile/
├── TerminalMobile.slnx             # Solution file
├── README.md                        # This file
├── ARCHITECTURE.md                  # Architecture documentation
├── .gitignore                       # Git ignore file
└── src/
    └── TerminalMobile/
        ├── TerminalMobile.csproj    # Project file
        ├── App.xaml(.cs)            # Application entry point
        ├── AppShell.xaml(.cs)       # Shell navigation
        ├── MauiProgram.cs           # DI configuration
        ├── Models/                  # Domain models
        │   ├── TerminalConnectionProfile.cs
        │   ├── TerminalSession.cs
        │   └── TerminalTheme.cs
        ├── Services/                # Application services
        │   ├── Interfaces/
        │   │   ├── ISshService.cs
        │   │   ├── ITelnetService.cs
        │   │   ├── IConnectionManager.cs
        │   │   └── ISecureStorageService.cs
        │   ├── SshService.cs
        │   ├── TelnetService.cs
        │   ├── ConnectionManager.cs
        │   └── SecureStorageService.cs
        ├── ViewModels/              # MVVM ViewModels
        │   ├── BaseViewModel.cs
        │   ├── ConnectionsViewModel.cs
        │   ├── TerminalViewModel.cs
        │   └── SettingsViewModel.cs
        ├── Views/                   # XAML Views
        │   ├── ConnectionsPage.xaml(.cs)
        │   ├── TerminalPage.xaml(.cs)
        │   └── SettingsPage.xaml(.cs)
        ├── Themes/                  # UI Themes
        │   └── MatrixTheme.xaml
        ├── Resources/               # App Resources
        │   ├── Strings/
        │   │   └── AppResources.resx
        │   ├── Fonts/
        │   ├── Images/
        │   ├── AppIcon/
        │   └── Splash/
        └── Platforms/               # Platform-specific code
            ├── Android/
            │   ├── AndroidManifest.xml
            │   ├── MainActivity.cs
            │   └── MainApplication.cs
            └── iOS/
                ├── Info.plist
                ├── AppDelegate.cs
                └── Program.cs

Usage

Adding a Connection Profile

  1. Launch the app
  2. On the Connections page, fill in the connection form:
    • Connection Name: Friendly name for the connection
    • Host: IP address or hostname
    • Port: SSH (22) or Telnet (23) port
    • Username: Your username
    • Protocol: Select SSH or Telnet
  3. Tap "ADD CONNECTION"

Connecting to a Server

  1. Find your saved connection in the list
  2. Tap "CONNECT"
  3. Enter your password when prompted
  4. The terminal page will open with an active connection

Using the Terminal

  • Send Commands: Type in the input field and tap SEND or press Enter
  • Quick Commands: Tap any quick command button to execute instantly
  • History Navigation: Use ↑/↓ buttons to browse command history
  • Special Keys: Use Ctrl+C and Tab buttons for terminal control

Managing Settings

  1. Navigate to Settings from the menu
  2. Adjust font size (12-32px)
  3. Toggle glow effects
  4. View app information

Security

Best Practices

  • ✅ Passwords stored using MAUI SecureStorage
  • ✅ HTML entity escaping for terminal output
  • ✅ Input validation and sanitization
  • ✅ No credentials committed to repository
  • ✅ .gitignore configured for secrets

Important Notes

  • Private keys and certificates should never be committed
  • Use environment-specific configuration files (excluded in .gitignore)
  • Enable 2FA on your SSH servers when possible
  • Regularly update dependencies for security patches

Dependencies

  • Microsoft.Maui.Controls (10.0.3): Core MAUI framework
  • SSH.NET (2024.2.0): SSH protocol implementation
  • CommunityToolkit.Mvvm (8.4.0): MVVM helpers and commands

App Store Compliance

iOS

  • ✅ Privacy manifest configured
  • ✅ Network usage descriptions in Info.plist
  • ✅ Minimum iOS 15.0 deployment target
  • ✅ Bundle identifier: com.kotbehamot.terminalmobile

Android

  • ✅ Internet and network state permissions
  • ✅ Min SDK 21 (Android 5.0)
  • ✅ Target SDK 35 (latest stable)
  • ✅ Application identifier: com.kotbehamot.terminalmobile

Troubleshooting

Build Errors

"MAUI workload not installed"

dotnet workload install maui

"Android SDK not found"

  • Install Android SDK via Visual Studio Installer or Android Studio

"iOS build requires macOS"

  • iOS builds can only be done on macOS with Xcode installed

Runtime Issues

"Connection failed"

  • Verify host, port, username, and password
  • Ensure network connectivity
  • Check firewall settings

"SSH key authentication not working"

  • Key-based authentication not yet implemented
  • Use password authentication

Roadmap

  • SSH key-based authentication
  • SCP/SFTP file transfer
  • Session persistence across app restarts
  • AI-powered command suggestions
  • Multiple concurrent terminal sessions
  • Custom keyboard layouts
  • Snippet/macro support
  • Dark/Light theme toggle
  • Internationalization (i18n)

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • SSH.NET library for robust SSH implementation
  • .NET MAUI team for the cross-platform framework
  • CommunityToolkit.Mvvm for MVVM helpers
  • Matrix movie for the cyberpunk aesthetic inspiration

Contact


Built with ❤️ using .NET MAUI

About

A SSH/Telnet mobile terminal built with .NET MAUI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages