Sign inSign up

pouya6672/ubuntu-ssh

By pouya6672

β€’Updated 12 months ago

Ubuntu server image with SSH preconfigured and root login enabled.

Image
Operating systems
0

6.8K

pouya6672/ubuntu-ssh repository overview

⁠🐧 Ubuntu 24.04 Server (with SSH Ready)

A lightweight Ubuntu 24.04 LTS Server container with preinstalled base tools and OpenSSH Server β€” ready to use instantly after docker run. No systemd or unnecessary services; only root access, minimal packages, and SSH access.


β πŸ”§ Features
  • Based on official ubuntu

  • Includes common base tools:

    openssh-server, curl, wget, vim, nano, iputils-ping, net-tools, iproute2, procps, lsb-release, tzdata, locales
    
  • SSH server auto-configured and ready on startup

  • Root login enabled

  • Root password configurable via environment variable

  • Works without systemd (using foreground sshd)

  • Lightweight and Docker-friendly


β πŸš€ Quick Start
⁠1. Run directly
docker run -d \
  --name ubuntu-ssh \
  -p 2222:22 \
  -e ROOT_PASSWORD="MySecret123" \
  docker.io/pouya6672/ubuntu-ssh

Default root password (if not specified): changeME1234

Then connect via SSH:

ssh root@<HOST_IP> -p 2222
# Password: MySecret123

⁠2. Using Docker Compose
version: "3.9"

services:
  ubuntu-ssh:
    image: pouya6672/ubuntu-ssh
    ports:
      - "2222:22"
    environment:
      ROOT_PASSWORD: "changeME1234"
    volumes:
      - ssh_host_keys:/etc/ssh
      - ssh_root_home:/root/.ssh
    restart: unless-stopped

volumes:
  ssh_host_keys:
  ssh_root_home:

Run with:

docker compose up -d

β πŸ” Environment Variables
VariableDescriptionDefault
ROOT_PASSWORDRoot password for SSH loginchangeME1234

⚠️ Security Note: It’s strongly recommended to change the default password immediately or use SSH keys instead of password login in production environments.


⁠🧰 Example Tools Available
CommandPurpose
ping, ip, ifconfigNetwork utilities
vim, nano, lessBasic editors & pagers
curl, wgetDownload tools
lsb_release, localeSystem info

⁠🧠 Notes
  • No systemd or systemctl included β€” pure process-based container.
  • SSH runs in foreground via /usr/sbin/sshd -D.
  • Host SSH keys persist automatically if mounted through volumes.

Tag summary

Content type

Image

Digest

sha256:cd389616d…

Size

48.3 MB

Last updated

12 months ago

docker pull pouya6672/ubuntu-ssh