Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.
/ dockerized-sshd Public archive

Running a docker instance and logging in with SSH, Everything is isolated and trying to share my VPS to my friends UwU.

License

Notifications You must be signed in to change notification settings

minlaxz/dockerized-sshd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Initial Setup:

docker build -t IMAGE_NAME .
docker run -d --name CONTAINER_NAME -p 6229:6229 -v /var/run/docker.sock:/var/run/docker.sock --restart unless-stopped IMAGE_NAME

You (can | must for first run) also add your pub keys with this,

    cat .pub | docker exec -i CONTAINER_NAME /bin/bash -c "cat >> /root/.ssh/authorized_keys"

Login to the container via SSH

    ssh -i PRIVATE -p 6229 root@HOST

View current authorized PUB keys

    docker exec -i ssh-srv /bin/bash -c "cat /root/.ssh/authorized_keys"

docker stop CONTAINER_ID

docker start CONTAINER_ID

you can also start a container with --rm so that it will be automatically removed when the container stops.

About

Running a docker instance and logging in with SSH, Everything is isolated and trying to share my VPS to my friends UwU.

Resources

License

Stars

Watchers

Forks

Packages