Secure Tunnel Access via Docker and SSH

GPU Trader provides zero-trust SSH tunnel access to your deployed containers. This means no open ports on your host, no blanket network access, and no risk of leaving insecure endpoints exposed.

Each connection is authorized per session and encrypted end-to-end, ensuring that only authenticated users with the correct SSH keys can access the container. Once you disconnect, the tunnel automatically shuts down—leaving nothing open behind.

This guide outlines how to spin up a secure tunnel using Docker and immediately SSH into your GPU container. Whether you’re running jobs, monitoring logs, or debugging live workloads, this gives you shell access without compromising on security.

Prerequisites

Before you can SSH into your container, make sure the following are set up on your local machine:

You’ll need Docker installed and running to launch the local tunnel container. Follow the guide below for your operating system:

macOS: Install Docker Desktop for Mac

Windows: Install Docker Desktop for Windows

Linux: Most distributions offer Docker via their package manager. For example, on Ubuntu:

sudo apt update
sudo apt install docker.io
sudo systemctl start docker
sudo systemctl enable docker

Or use the official guide: Install Docker Engine on Linux

Once installed, test Docker is running:

docker version

You should see client and server version output. If not, refer to the troubleshooting section of the install docs.

Usage

Create an SSH Keypair

To create an SSH keypair, run the following command (you’ll need to keep track of the filename and path):

# On Linux or macOS:
ssh-keygen -t rsa -b 4096 -f <filename>

# On Windows (using PowerShell):
ssh-keygen -t rsa -b 4096 -f <filename>

This will generate:

  • A private key (e.g., <filename>)
  • A public key (e.g., <filename>.pub)

Add your SSH Public Key to your Account

Navigate to your Profile account settings page Copy the contents of your public key file (e.g., <filename>.pub) and paste it into the SSH keys section.

Choose Your Template

Pick a template you want to use and toggle the SSH tunnel option to enable it.

After your stack has been deployed there will be a drop down under the ports section that says “SSH”.

Click on SSH

Click on either “Copy Unix Script” or “Copy Windows Script” to copy the script to your clipboard.

Open a terminal on your local machine and paste the copied script into it. This script will start a Docker container with the tunnel service and automatically SSH into your device. You will need to provide the path and file name of the private SSH Key you created earlier.

Once connected you can run commands on your device as if you were logged in directly.