Skip to content

antonjah/ssm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssm (ssh-menu)

A simple terminal-based SSH host selector written in Go. It parses your ~/.ssh/config file and presents a interactive menu to choose which host to connect to.

Features

  • Parses SSH config files automatically
  • Interactive TUI menu using Bubbletea
  • Tmux integration: creates new windows for SSH sessions when running inside tmux
  • Fast and lightweight

Installation

Using Go

go install github.com/antonjah/ssm/cmd/ssm@latest

Using Nix Flakes

Add ssm as an input to your flake:

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    ssm.url = "github:antonjah/ssm";
    ssm.inputs.nixpkgs.follows = "nixpkgs";
  };
}

Then use it in one of two ways:

As a package

{
  home.packages = [
    inputs.ssm.packages.${system}.default
  ];
}

Or with an overlay:

{
  nixpkgs.overlays = [ inputs.ssm.overlays.default ];
  
  home.packages = with pkgs; [
    ssm
  ];
}

As a home-manager module

{
  imports = [ inputs.ssm.homeModules.default ];

  programs.ssm.enable = true;
}

Usage

  1. Ensure your SSH config is set up at ~/.ssh/config with host entries:
Host server1
    HostName 192.168.1.100
    User myuser

Host server2
    HostName example.com
    User anotheruser
    IdentityFile /home/foo/.ssh/id_rsa
  1. Run the program:
ssm
  1. Use arrow keys to navigate, Enter to select, or type to filter hosts.

  2. The program will connect to the selected host using SSH.

Tmux Integration

When running inside a tmux session, the program will:

  • Create a new tmux window for the SSH session
  • Switch to existing window if one already exists for that host
  • Name windows as ssh:hostname

About

A TUI for your ssh config

Resources

License

Stars

Watchers

Forks

Packages

No packages published