Skip to main content
SSH (Secure Shell) keys are a secure way to authenticate and connect to remote servers without using passwords. This guide covers what SSH keys are, how to generate them, and how they work with TensorPool.

What Are SSH Keys?

SSH keys come in pairs:
  • Private Key - Stays on your local machine and must be kept secret
  • Public Key - Can be safely shared with servers you want to access
Think of it like a lock and key: the public key is the lock (installed on servers), and the private key is the key (stays with you). When you try to connect, the server uses your public key to verify that you have the matching private key.

Generating SSH Keys

For Linux and macOS

Open your terminal and run:
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519
You’ll be prompted to:
  1. Choose a location (press Enter to use the default ~/.ssh/id_ed25519)
  2. Set a passphrase (optional but recommended for extra security)
This creates two files:
  • ~/.ssh/id_ed25519 - Your private key (keep this secret!)
  • ~/.ssh/id_ed25519.pub - Your public key (share this with services)

For Windows

Option 1: Using Windows Subsystem for Linux (WSL) Open WSL terminal and use the same command as Linux/macOS above. Option 2: Using PuTTYgen
  1. Download and install PuTTY
  2. Open PuTTYgen
  3. Click “Generate” and move your mouse to create randomness
  4. Save both the private and public keys
  5. Copy the public key text from the window
Option 3: Using Git Bash If you have Git for Windows installed, open Git Bash and use the same command as Linux/macOS.

SSH Key Best Practices

Security

  • Never share your private key - Only share the public key (.pub file)
  • Use a passphrase - Adds an extra layer of security
  • Set proper permissions - Your private key should only be readable by you:
    chmod 600 ~/.ssh/id_ed25519
    

Organization

  • Use descriptive names - If you have multiple keys, name them clearly:
    ssh-keygen -t ed25519 -f ~/.ssh/tensorpool_key
    
  • Keep backups - Store your keys securely in case your machine fails

SSH Keys with TensorPool

Adding Your SSH Key to Your Account

You can add SSH keys to your TensorPool account in two ways: Option 1: Using the CLI
tp ssh key create ~/.ssh/id_ed25519.pub --name "joshua"
This uploads your public key to your TensorPool account. The --name flag is optional but helps you identify specific keys. Option 2: Using the Dashboard Visit tensorpool.dev/dashboard/ssh-keys to manage your SSH keys through the web interface. You can add, view, and remove keys from there.

Using SSH Keys with Clusters

When creating a TensorPool cluster, provide your public SSH key:
tp cluster create -i ~/.ssh/id_ed25519.pub -t 1xH100 --name my-cluster
The -i flag specifies the path to your public key file (the one ending in .pub). For more details on using SSH keys with TensorPool clusters, see SSH Keys.

Troubleshooting

Permission Denied

If you get “Permission denied (publickey)”, check that:
  1. You’re using the correct private key
  2. The corresponding public key was added to the cluster
  3. Your private key has the correct permissions (chmod 600)

Key Not Found

If SSH can’t find your key, specify it explicitly:
ssh -i ~/.ssh/id_ed25519 tensorpool@<cluster_ip>

Multiple Keys

If you have multiple SSH keys, you can configure SSH to use specific keys for specific hosts by editing ~/.ssh/config:
Host *.tensorpool.dev
    IdentityFile ~/.ssh/tensorpool_key
    User tensorpool

Next Steps

I