Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CLI tool for managing SSH connections easily and efficiently.

License

Notifications You must be signed in to change notification settings

AndreLeclercq/sshctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

75 Commits

Repository files navigation

πŸ” SSHCTL

Rust License AUR SSHCTL AUR GitHub release

SSHCTL is a lightweight CLI tool designed to simplify and streamline SSH connection management. It allows you to store, edit, and quickly connect to your servers using intuitive commands. ⚑

Note: Currently, the focus is on Linux compatibility, as it aligns with my personal workflow. However, support for Windows and macOS is planned if there is community interestβ€”feel free to open an issue or discussions! πŸ’¬

πŸ“‹ Versioning & Stability

  • Stable versions: Tagged releases (e.g., v0.1.0, v0.2.0) are considered stable and production-ready βœ…
  • Development version: The main branch contains the latest development code and is not considered stable ⚠️

πŸ“¦ Installation

πŸ”§ From Source

cargo build --release

🐧 Arch Linux

  • Stable version: sshctl (binary package from latest stable release)
  • Development version: sshctl-git (builds from main branch)
# For stable version
paru -S sshctl
# For development version (main branch)
paru -S sshctl-git

πŸš€ Commands

# Connect πŸ”Œ
sshctl <connection-name> #ex: sshctl prod-server
# Add connection βž•
sshctl connection add <connection-name> #ex: sshctl connection add prod-server 
# Edit connection ✏️
sshctl connection edit <connection-name> #ex: sshctl connection edit prod-server
# Remove connection ❌
sshctl connection remove <connection-name> #ex: sshctl connection remove prod-server
# Show connection πŸ‘€
sshctl connection show <connection-name> #ex: sshctl connection show prod-server
# List connections πŸ“
sshctl connection list

βš™οΈ Configuration

Connections are saved in ~/.config/sshctl/connections.toml (or OS equivalent).

Config file structure:

[connections.prod-server]
host = "192.168.1.100"
user = "admin"
port = 2222
ssh_key_path = "~/.ssh/id_ed25519"
description = "This is the prod server. OVH VPS"
[connections.dev-local]
host = "localhost"
user = "developer"
port = 22

πŸ‘¨β€πŸ’» Development

πŸ“š Main dependencies

  • clap : CLI argument parsing
  • serde + toml : TOML config serialization
  • dirs : cross-platform config file paths
  • dialoguer : interactive prompts
  • anyhow : error handling
  • thiserror : custom error types

πŸ—οΈ Architecture

Built with performance-first mindset using Rust:

  • Zero-copy parsing with serde
  • Minimal allocations for config handling
  • Cross-platform compatibility via dirs crate
  • Interactive UX with dialoguer

πŸ“‹ Roadmap

  • Manage ssh key
  • Improve connection commands

Part of my transition journey from Fullstack Development to AI/Data Engineering, showcasing Rust for performance-critical applications. πŸš€

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /