A vim-inspired terminal user interface (TUI) for managing SSH config files. Easily browse, search, edit, and connect to your SSH hosts with a beautiful, keyboard-driven interface.
- Two-panel interface: Browse hosts on the left, view details on the right
- Vim-like keybindings: Navigate with
j/k, search with/, and more - Visit tracking: Most frequently used hosts appear at the top
- Full CRUD operations: Add, edit, and delete SSH config entries
- Search functionality: Quickly find hosts by name, hostname, user, or description
- Preserves formatting: Maintains comments and formatting in your SSH config file
- Descriptions: Add descriptions to hosts for better organization
- Clear visit history: Reset visit counts with
xhotkey
brew install nicklasos/tap/gosshitDownload the latest binary for your platform from the releases page.
macOS:
# Intel Mac
curl -L https://github.com/nicklasos/gosshit/releases/latest/download/gosshit_Darwin_x86_64.tar.gz | tar xz
sudo mv gosshit /usr/local/bin/
# Apple Silicon (M1/M2)
curl -L https://github.com/nicklasos/gosshit/releases/latest/download/gosshit_Darwin_arm64.tar.gz | tar xz
sudo mv gosshit /usr/local/bin/Linux:
# AMD64
curl -L https://github.com/nicklasos/gosshit/releases/latest/download/gosshit_Linux_x86_64.tar.gz | tar xz
sudo mv gosshit /usr/local/bin/
# ARM64
curl -L https://github.com/nicklasos/gosshit/releases/latest/download/gosshit_Linux_arm64.tar.gz | tar xz
sudo mv gosshit /usr/local/bin/Windows:
Download the .zip file from releases and extract it to a directory in your PATH.
go install github.com/nicklasos/gosshit@latestMake sure $GOPATH/bin or $GOBIN is in your PATH.
Simply run:
gosshitThe application will:
- Read your
~/.ssh/configfile (creating it if it doesn't exist) - Load visit tracking data from
~/.gosshit(creating it if it doesn't exist) - Display all your SSH hosts sorted by visit frequency
j/↓- Move down in the listk/↑- Move up in the list/- Enter search modea- Add a new host entrye- Edit the selected host entryd- Delete the selected host entryx- Clear all visit counts (with confirmation)Enter- Connect to the selected host via SSHq/Ctrl+C- Quit the application
- Type to filter the host list in real-time
Enter- Exit search mode and select first matchEsc- Cancel search and return to normal mode
Tab- Move to the next fieldShift+Tab- Move to the previous fieldEnter- Save changesEsc- Cancel editing and return to normal mode
y- Confirm deletionn/Esc- Cancel deletion
The tool expects standard SSH config format. Descriptions are stored as comments above the Host entry:
# Description: My production server
Host prod
HostName example.com
User deploy
Port 22
IdentityFile ~/.ssh/id_rsa
- Host - The host alias (required)
- HostName - The actual hostname or IP address (required)
- User - Username for SSH connection (optional, defaults to "root" in editor)
- Port - SSH port (optional, defaults to "22" in editor)
- IdentityFile - Path to SSH private key (optional, enter path manually)
- Description - Added as a comment above the Host entry
The tool tracks how often you connect to each host and automatically sorts them by visit frequency. This data is stored in ~/.gosshit as a simple text file:
prod:42
dev:15
staging:8
To build from source:
git clone https://github.com/nicklasos/gosshit.git
cd gosshit
go build -o gosshitThe project includes a Makefile with convenient commands:
make build # Build the binary
make install # Install to GOPATH/bin
make test # Run tests
make test-verbose # Run tests with verbose output
make coverage # Run tests with coverage report (generates coverage.html)
make clean # Remove build artifacts
make run # Build and run the application
make fmt # Format code with gofmt
make vet # Run go vet
make check # Run fmt, vet, and test
make help # Show all available commands# Quick test run
make test
# Verbose test output
make test-verbose
# Generate coverage report
make coverage
# Opens coverage.html in your browser- Go 1.21 or later
- A terminal with support for ANSI colors
MIT
