Skip to content

plfanzen/ssh-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

ssh-test

A simple Docker container with an SSH server for testing purposes.

Features

  • Ubuntu 22.04 based Docker container
  • OpenSSH server configured with password authentication
  • Pre-configured user: plfanzen with 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.

Usage

Using the Pre-built Image from GitHub Container Registry

docker pull ghcr.io/plfanzen/ssh-test:latest
docker run -d -p 2222:22 --name ssh-test ghcr.io/plfanzen/ssh-test:latest

Building the Docker Image Locally

docker build -t ssh-server .

Running the Container

docker run -d -p 2222:22 --name ssh-test ssh-server

Connecting via SSH

ssh -p 2222 plfanzen@localhost

When prompted, enter the password: plfanzy

Alternatively, using sshpass:

sshpass -p 'plfanzy' ssh -o StrictHostKeyChecking=no -p 2222 plfanzen@localhost

Stopping the Container

docker stop ssh-test
docker rm ssh-test

CI/CD

This project includes a GitHub Actions workflow that:

  1. Builds the Docker image and pushes it to GitHub Container Registry (ghcr.io)
  2. Runs the container
  3. Tests SSH connectivity
  4. Reports results

The workflow runs automatically on pushes and pull requests to the main/master branch.

Available Images

Images are automatically published to:

  • ghcr.io/plfanzen/ssh-test:latest - Latest version from main/master branch
  • ghcr.io/plfanzen/ssh-test:<branch> - Branch-specific builds
  • ghcr.io/plfanzen/ssh-test:<branch>-<sha> - Commit-specific builds

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •