Sign inSign up

blackbooster/my-ssh-tmux

By blackbooster

•Updated 5 months ago

SSH-accessible Ubuntu tmux jump host

Image
Networking
Security
0

537

blackbooster/my-ssh-tmux repository overview

⁠my-ssh-tmux

SSH-accessible Ubuntu 24.04 environment that starts or attaches to a tmux session on login.

The image is intended as a small SSH jump host or remote shell container with persistent terminal sessions through tmux.

⁠Pull

docker pull blackbooster/my-ssh-tmux:latest

⁠Build

docker build -t blackbooster/my-ssh-tmux:latest .

⁠Run with an SSH key

docker run -d \
  --name my_ssh_tmux_container \
  -p 2222:22 \
  -e AUTHORIZED_KEYS="$(cat ~/.ssh/id_ed25519.pub)" \
  blackbooster/my-ssh-tmux:latest
ssh root@localhost -p 2222

⁠Run with a root password

Password login is disabled unless ROOT_PASSWORD is set.

docker run -d \
  --name my_ssh_tmux_container \
  -p 2222:22 \
  -e ROOT_PASSWORD='change-me' \
  blackbooster/my-ssh-tmux:latest
ssh root@localhost -p 2222

⁠Run with Docker Compose

AUTHORIZED_KEYS="$(cat ~/.ssh/id_ed25519.pub)" docker compose up -d

Or with password authentication:

ROOT_PASSWORD='change-me' docker compose up -d

⁠Push to Docker Hub

docker login
docker build -t blackbooster/my-ssh-tmux:latest .
docker push blackbooster/my-ssh-tmux:latest

⁠Troubleshooting

If the container exits immediately, check the SSH startup error:

docker logs my_ssh_tmux_container

Remove the failed test container before starting another one with the same name:

docker rm my_ssh_tmux_container

⁠Security Notes

  • SSH host keys are generated when the container first starts, not baked into the image.
  • No default root password is stored in the image.
  • Key-based SSH login is preferred through AUTHORIZED_KEYS.
  • sshd logs to container stdout/stderr via -e; no rsyslog side process is required.

Tag summary

Content type

Image

Digest

sha256:c1e0cfa68…

Size

33.8 MB

Last updated

5 months ago

docker pull blackbooster/my-ssh-tmux