Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pders01/gt

gt is a command-line tool that simplifies SSH connections by leveraging your existing SSH configuration. It provides a colorful, user-friendly interface to connect to your SSH hosts and supports all standard SSH config features including config includes.
https://github.com/pders01/gt

Last synced: 17 days ago
JSON representation

gt is a command-line tool that simplifies SSH connections by leveraging your existing SSH configuration. It provides a colorful, user-friendly interface to connect to your SSH hosts and supports all standard SSH config features including config includes.

Awesome Lists containing this project

README

        

# gt - A simple SSH connection manager

gt is a command-line tool that simplifies SSH connections by leveraging your existing SSH configuration. It provides a colorful, user-friendly interface to connect to your SSH hosts and supports all standard SSH config features including config includes.

## Features

- 🚀 Direct connection to hosts from your SSH config
- 🎨 Colorful, readable output
- 📋 List available SSH hosts with user and hostname info
- 🔄 Automatic handling of SSH config includes
- 🔑 Support for all SSH options (Port, IdentityFile, etc.)
- 👤 User override capability
- 📦 SCP support
- ✨ Shell completion for hosts

## Installation

### From Source

```bash
go install
```

### From Release

1. Download the appropriate version for your system from the [releases page](https://github.com/pders01/gt/releases)
2. For macOS users:
- The binary is ad-hoc signed for basic security verification
- When you first run it, you'll see a security warning
- You can approve it by:
- `xattr -d com.apple.quarantine ./gt`
3. Add the binary to your PATH

## Usage

### Basic Connection

```bash
gt # Connect to a host
gt # Run command on host
```

### List Available Hosts

```bash
gt list # List all available hosts
```

### Options

```bash
gt -u root # Connect as root user
gt -s # Use SCP instead of SSH
gt --config ~/.ssh/custom_config # Use custom config file
```

## Configuration

gt uses your existing SSH configuration (`~/.ssh/config` by default) and supports all standard SSH config features. No additional configuration is needed.

Example SSH config:

```ssh-config
# In ~/.ssh/config
Include ~/.ssh/config.d/*

Host dev
HostName dev.example.com
User developer
Port 2222

Host prod
HostName prod.example.com
User admin
IdentityFile ~/.ssh/prod_key
```

## Options

- `-u, --user`: Override SSH config user
- `-s, --scp`: Use SCP instead of SSH
- `-c, --config`: Specify custom SSH config file path
- `--help`: Show help message

## License

MIT

---
Created by [pders01](https://github.com/pders01) with ❤️
Special thanks [Cascade (Codeium AI)](https://codeium.com) for assistance.