A simple Docker container with an SSH server for testing purposes.
- Ubuntu 22.04 based Docker container
- OpenSSH server configured with password authentication
- Pre-configured user:
plfanzenwith password:plfanzy - Automated CI/CD with GitHub Actions
Note: This container uses a hardcoded password for testing purposes only. Do not use in production environments without implementing proper security measures.
docker pull ghcr.io/plfanzen/ssh-test:latest
docker run -d -p 2222:22 --name ssh-test ghcr.io/plfanzen/ssh-test:latestdocker build -t ssh-server .docker run -d -p 2222:22 --name ssh-test ssh-serverssh -p 2222 plfanzen@localhostWhen prompted, enter the password: plfanzy
Alternatively, using sshpass:
sshpass -p 'plfanzy' ssh -o StrictHostKeyChecking=no -p 2222 plfanzen@localhostdocker stop ssh-test
docker rm ssh-testThis project includes a GitHub Actions workflow that:
- Builds the Docker image and pushes it to GitHub Container Registry (ghcr.io)
- Runs the container
- Tests SSH connectivity
- Reports results
The workflow runs automatically on pushes and pull requests to the main/master branch.
Images are automatically published to:
ghcr.io/plfanzen/ssh-test:latest- Latest version from main/master branchghcr.io/plfanzen/ssh-test:<branch>- Branch-specific buildsghcr.io/plfanzen/ssh-test:<branch>-<sha>- Commit-specific builds