Skip to content

SSH server (sshd) docker images pack with user root and password 123. Provides preinstalled python.

Notifications You must be signed in to change notification settings

baterflyrity/pythonssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python SSH

SSH server (sshd) docker images pack with user root and password 123.

Each container contains preinstalled python with tag version, e.g. baterflyrity/pythonssh:3.12 = python:3.12 + sshd.

Usage example

Start container and connect to it via ssh (wait for several seconds to let server self-configure):

docker run -itd --rm -p 12345:22/tcp --name pythonssh baterflyrity/pythonssh
# wait for self-configuration
ssh root@localhost -p 12345 # password is 123

then via ssh interactive session in container

python3 -V
pip3 list

container will be deleted automatically (option --rm) on exit. One can force container to exit with:

docker stop pythonssh

Alternatively just start ssh server in container and run some commads:

docker run -itd --rm -p 12345:22/tcp --name pythonssh baterflyrity/pythonssh  
# wait for self-configuration
ssh root@localhost -p 12345 python3 -V && pip3 list # password is 123
# delete server after done
docker stop pythonssh

Building from sources

Requirements:

  • docker
  • python3.11+
  • git
git clone https://github.com/baterflyrity/pythonssh
cd  pythonssh
python3.11 -m pip install -r requirements.txt
python3.11 builder.py make --password 123 --image baterflyrity/python-autostart:alpine --image baterflyrity/python-autostart:3.12-alpine --image baterflyrity/python-autostart:3.11-alpine --image baterflyrity/python-autostart:3.10-alpine --image baterflyrity/python-autostart:3.9-alpine --image baterflyrity/python-autostart:3.8-alpine
python3.11 builder.py build --user baterflyrity # insert your username
# optionally upload to dockerhub
python3.11 builder.py push

See also

Changelog

1.1.1

  • Add python 3.12.
  • Fix alpine miss flavor.

1.1.0

About

SSH server (sshd) docker images pack with user root and password 123. Provides preinstalled python.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published