ssh-tunneling

Implement SSH tunnels and local port forwarding in Go.

1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/JustCodePL/ssh-tunnel-manager --skill ssh-tunneling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ssh-tunneling
Source: https://github.com/JustCodePL/ssh-tunnel-manager/tree/main/.claude/skills/ssh-tunneling
Command: npx skills add https://github.com/JustCodePL/ssh-tunnel-manager --skill ssh-tunneling

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go developers need reliable patterns to establish SSH connections, forward local ports, and manage authentication and keep-alive behavior in Go projects.

Core Features & Use Cases

  • Local port forwarding support with go-ssh patterns
  • Key loading, with and without passphrases, and host key handling
  • Reconnection logic with backoff and keep-alive pings
  • SSH config parsing for hosts and tunnels to reproduce in code

Quick Start

Install and adapt the Go SSH tunneling pattern to establish a local port forward using the provided code examples.

Frequently Asked Questions about ssh-tunneling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up local port forwarding in Go using SSH?

To set up local port forwarding in Go, you establish an SSH connection and map a local port to a remote destination using provided code patterns. This Skill supplies the structural logic for tunneling data safely through the configured port.

How does SSH key authentication work with passphrases in Go?

SSH key authentication with passphrases in Go requires loading the encrypted private key and supplying the passphrase to decrypt it. The provided patterns configure client options to safely verify host keys during the connection handshake.

What is the best way to parse SSH config files for hosts and tunnels in Go?

Parsing SSH config files in Go extracts host configurations and tunnel parameters to reproduce them in code. This approach dynamically loads connection settings, port forwarding rules, and key paths directly from standard SSH config syntax.

How do I implement automatic reconnection and keep-alive for SSH tunnels in Go?

Implementing automatic reconnection for SSH tunnels in Go uses exponential backoff logic to retry failed connections. Keep-alive pings maintain the active session, ensuring the tunnel persists and recovers from network interruptions automatically.

How do I perform safe host key verification when establishing an SSH connection in Go?

Safe host key verification in Go validates the server's public key against known hosts before establishing the SSH connection. This process prevents unauthorized access by ensuring the remote server matches the expected cryptographic identity.