hut
hut is not a standard Linux command
TLDR
Initialize hut's configuration file (this will prompt for an OAuth2 access token, which is required to use hut)
List Git/Mercurial repositories
Create a public Git/Mercurial repository
List jobs on
Show the status of a job
SSH into a job container
SYNOPSIS
hut [options] <local_port> <remote_host> <remote_port>
hut -R [options] <local_port> <remote_host> <remote_port>
hut setup <host>
PARAMETERS
<local_port>
The local port on which hut will listen for incoming connections to tunnel.
<remote_host>
The target remote host to which the tunnel should be established.
<remote_port>
The port on the remote host to which the tunnel should connect.
-h, --help
Show the program's help message and exit.
-v, --verbose
Enable verbose output for detailed execution information.
-d, --daemon
Run hut in the background as a daemon.
-f, --force
Force setup, potentially overwriting existing configurations.
-o, --open
Automatically open the tunnel after establishment (e.g., open a browser).
-x, --no-open
Do not automatically open the tunnel (conflicts with -o).
-R, --reverse
Create a reverse tunnel, allowing remote hosts to connect to a local service via the tunnel.
-c CONFIG, --config CONFIG
Specify an alternative configuration file path.
-L, --no-listener
For reverse tunnels (-R), do not create a local listener.
setup <host>
Command to set up necessary SSH configurations (e.g., ProxyCommand) for a specified host.
DESCRIPTION
The hut command is a specialized Python-based utility designed to establish secure SSH tunnels in network environments where direct SSH access is restricted.
It primarily addresses scenarios where firewalls limit outbound connections to only standard web ports, such as HTTP (80) and HTTPS (443). By leveraging the ProxyCommand feature within SSH, hut can encapsulate SSH traffic within these allowed ports, effectively creating a secure conduit through strict firewall rules. This allows users to access internal network services or hosts that would otherwise be unreachable.
hut simplifies the configuration process for both local and reverse tunnels, making it easier to manage complex SSH tunneling setups for bypassing network restrictions. It's particularly useful for developers or system administrators needing to access resources behind corporate firewalls or highly secured networks, enabling remote access to services like databases, internal web servers, or other machines.
CAVEATS
hut is not a standard Linux command; it requires manual installation, typically via pip or by cloning its source from GitHub.
It relies on Python and a compatible SSH server on the remote side, often requiring specific sshd_config settings (e.g., allowing ProxyCommand or specific port forwarding).
Improper use could pose security risks by bypassing intended network segmentation and exposing internal services.
Its functionality is highly dependent on network firewall configurations allowing outbound connections on common web ports (80/443).
<I>RELIANCE ON SSH CONFIGURATION</I>
The hut command heavily relies on the underlying SSH client and server configurations. Specifically, it often utilizes the ProxyCommand or ProxyJump directives within the SSH configuration file (e.g., ~/.ssh/config) on the client side to establish the initial connection through an intermediary host on port 80 or 443. The remote SSH server must also be configured to properly handle these proxied connections, sometimes involving specific ForceCommand or PermitTunnel settings for the tunnel to function correctly.
HISTORY
The hut command is an open-source project, primarily developed in Python by Simon H. Zschach (sshz). It emerged as a solution for specific network challenges related to establishing SSH tunnels through highly restrictive firewalls. Not being part of core Linux utilities, its development and distribution are managed through platforms like GitHub, reflecting a community-driven approach to niche network tools. Its usage has grown among users facing specific firewall traversal issues rather than being a universally adopted command.