Free Public SSH Servers for Testing SSH Client Applications: How to Find & Use Them


2 views

When developing SSH client applications or automation scripts, having reliable test servers is crucial. Many developers face the challenge of finding publicly accessible SSH servers that allow basic connectivity testing without requiring authentication or special permissions.

Several organizations maintain public SSH servers specifically for testing purposes:

# Example of connecting to a test server
ssh test.rebex.net -p 22
# Username: demo
# Password: password

Rebex provides this free SSH server with read-only access to a small test file system. Perfect for verifying basic SSH client functionality.

For more extensive testing, consider these solutions:

# Docker-based SSH test container
docker run -d -p 2222:22 \
  -e SSH_USERS="tester:1000:1000" \
  -e SSH_ENABLE_PASSWORD_AUTH=true \
  lscr.io/linuxserver/openssh-server

This spins up a temporary SSH server with user "tester" (password same as username) that self-destructs when stopped.

Some Linux/BSD communities offer shell accounts that can serve as test targets:

  • sdf.org (requires free registration)
  • devio.us (BSD-based)
  • tilde.club (community server)

When writing automated tests, consider these patterns:

# Python example using Paramiko
import paramiko
from time import sleep

def test_ssh_connection():
    client = paramiko.SSHClient()
    client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    try:
        client.connect('test.rebex.net', 
                      username='demo',
                      password='password',
                      timeout=10)
        return True
    except Exception as e:
        print(f"Connection failed: {str(e)}")
        return False
    finally:
        client.close()

While testing with public servers:

  • Never send sensitive data
  • Assume all traffic is logged
  • Use unique credentials (never reuse production credentials)
  • Clean up any test files created

For persistent testing needs, setting up a local test server is straightforward:

# Ubuntu/Debian setup
sudo apt update
sudo apt install openssh-server
sudo ufw allow 22/tcp
sudo systemctl enable --now ssh

Configure with PasswordAuthentication yes in /etc/ssh/sshd_config for testing.


When developing SSH client applications or libraries, you often need real SSH servers for testing connectivity, authentication, and protocol handling. While you could set up your own local server, public test servers offer convenience and diverse environments.

Here are some reliable public SSH servers you can use for testing:

# Example connection to a public SSH server
ssh test.rebex.net -p 22 -l demo
password: password

Some notable public SSH servers include:

  • test.rebex.net - Free demo server (username: demo, password: password)
  • ssh.example.com - Another test server (username: test, password: test)
  • sdf.org - Free community server (requires account registration)

Here's a Python example using Paramiko to test SSH connectivity:

import paramiko

def test_ssh_connection(host, port, username, password):
    client = paramiko.SSHClient()
    client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    try:
        client.connect(host, port=port, username=username, password=password)
        print("SSH connection successful!")
        stdin, stdout, stderr = client.exec_command('uname -a')
        print(stdout.read().decode())
        client.close()
        return True
    except Exception as e:
        print(f"Connection failed: {str(e)}")
        return False

# Test connection to public server
test_ssh_connection('test.rebex.net', 22, 'demo', 'password')

When using public SSH servers for testing:

  • Never use real credentials - these servers are for testing only
  • Expect limited functionality - most won't allow file modifications
  • Be mindful of rate limits - don't flood servers with test requests
  • Consider setting up your own test container for more control

For more control, you can quickly spin up a local test server using Docker:

# Run a temporary SSH server
docker run --rm -p 2222:22 -e SSH_USERS="testuser:1000:1000" -e SSH_PASSWORDS="testuser:testpass" linuxserver/openssh-server

# Connect to your local test server
ssh testuser@localhost -p 2222

This gives you a disposable SSH server with full control over the environment.