Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonswine/docker-dropbear
Dropbear in an Docker container
https://github.com/simonswine/docker-dropbear
Last synced: 27 days ago
JSON representation
Dropbear in an Docker container
- Host: GitHub
- URL: https://github.com/simonswine/docker-dropbear
- Owner: simonswine
- Created: 2014-11-21T09:58:27.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-21T10:33:37.000Z (about 10 years ago)
- Last Synced: 2023-03-11T19:37:01.612Z (almost 2 years ago)
- Language: Shell
- Size: 113 KB
- Stars: 8
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##Docker image **simonswine/dropbear**
Minimal docker image with SSH daemon dropbear.
* Creates host keys if non existing
* Could be used for restricted root ssh access###Example usage
#### Container only no volumes
```
# Fetch image
docker fetch simonswine/dropbear# Start a container and map to host port 22001
docker run -d -p 22001:22 simonswine/dropbear
1f4d54c419e3ece40ed4a2f9c0f46702d20c8940413f87d96e6065e51a430fbb# Add a public key
docker exec -t -i 1f4d54 /bin/bash
root@1f4d54c419e3:/# mkdir -p /root/.ssh && echo "ssh-rsa [...]" > /root/.ssh/authorized_keys
```#### Persistent volumes
```
# Fetch image
docker fetch simonswine/dropbear# Start a container and map to host port 22001
docker run -d -p 22001:22 \
-v /_container1/dropbear:/etc/dropbear \
-v /_container1/ssh:/root/.ssh \
simonswine/dropbear# Add a public key
echo "ssh-rsa [...]" > /_container1/ssh/authorized_keys
```
### Example with capistrano
* https://www.simon.im/netz/2014/11/secure-capistrano-deployment-with-root-rights