Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/natthasath/demo-docker-ssh
Connecting to a running Docker container via SSH to execute commands and access a shell inside the container. This is useful for debugging, troubleshooting, and managing the container. The container must have an SSH server and be running in privileged mode.
https://github.com/natthasath/demo-docker-ssh
docker-compose dockerfile ssh
Last synced: about 2 months ago
JSON representation
Connecting to a running Docker container via SSH to execute commands and access a shell inside the container. This is useful for debugging, troubleshooting, and managing the container. The container must have an SSH server and be running in privileged mode.
- Host: GitHub
- URL: https://github.com/natthasath/demo-docker-ssh
- Owner: natthasath
- License: mit
- Created: 2022-12-15T04:02:06.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-13T06:51:06.000Z (7 months ago)
- Last Synced: 2024-06-13T09:57:19.869Z (7 months ago)
- Topics: docker-compose, dockerfile, ssh
- Language: YAML
- Homepage: https://goteleport.com/blog/shell-access-docker-container-with-ssh-and-docker-exec/
- Size: 10.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 🎉 Demo Docker SSH
Connecting to a running Docker container via SSH to execute commands and access a shell inside the container. This is useful for debugging, troubleshooting, and managing the container. The container must have an SSH server and be running in privileged mode.
![version](https://img.shields.io/badge/version-1.0-blue)
![rating](https://img.shields.io/badge/rating-★★★★★-yellow)
![uptime](https://img.shields.io/badge/uptime-100%25-brightgreen)### 🔔 Generate SSH Key
```shell
./ssh-keygen.sh
```### 🏆 Run
```shell
docker-compose up -d
```### 👉🏻 Try it out
```shell
ssh -i id_rsa sshuser@localhost -p 2222
```