8000 GitHub - ualex73/docker-sshd
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ualex73/docker-sshd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

SSH Server

This image allow to run a sshd instance to allow simple SSH access to an Linux system and can be used as stepping stone. It is also possible to enable fail2ban to block failed login attempts.

Volumes

/config

Run

Launch the SSH Server docker container with the following command:

docker run [-d] \
    --name=ssh \
    -p 10022:22 \
    -e USERNAME="alex" \
    -e USERPASSWORD="alex" \
    -e USERSUDO="yes" \
    -e ROOTPASSWORD=donotknow \
    -e ROOTLOGIN="no" \
    -e FAIL2BAN="yes" \
    -v /docker/ssh:/config \
    ualex73/docker-sshd

Where:

  • USERNAME: The user's username.
  • USERPASSWORD: The user's password.
  • USERSUDO: If the user is allowed to use 'sudo'.
  • ROOTPASSWORD: The 'root' password. If not specified, it will use a random password. This password is in the docker logfile.
  • ROOTLOGIN: If 'root' is allowed to login.
  • FAIL2BAN: Enable fail2ban to block failed login attempts.
  • /docker/ssh: This is where the persistent SSH keys are stored.
  • 22: SSH Server port.

Docker-compose.yaml Example

version: '3'

services:

 ssh:
    container_name: ssh
    image:  ualex73/docker-sshd
    restart: unless-stopped
    ports:
      - 10022:22
    environment:
      - USERNAME="alex"
      - USERPASSWORD="alex"
      – USERSUDO="yes"
      – ROOTPASSWORD=donotknow
      - ROOTLOGIN="no"
    volumes:
      - /docker/ssh:/config

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0