https://github.com/docksal/service-ssh-proxy
SSH Proxy service image for Docksal
https://github.com/docksal/service-ssh-proxy
Last synced: about 1 year ago
JSON representation
SSH Proxy service image for Docksal
- Host: GitHub
- URL: https://github.com/docksal/service-ssh-proxy
- Owner: docksal
- Created: 2019-01-22T18:58:55.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2019-12-19T08:41:57.000Z (over 6 years ago)
- Last Synced: 2024-05-22T15:27:30.571Z (about 2 years ago)
- Language: Shell
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SSH proxy Docker image for Docksal
Automated SSH proxy for Docksal.
Docksal SSH Proxy is proxy-like ware, and route connections by project
name to the appropriate `cli` container.
```
+---------+ +---------------+ +------------+
| | | | | |
| Bob +-- ssh -l project1 --+ | +-----> project1 |
| | | | SSH Proxy | | | |
+---------+ | | | | +------------+
+------------->--+ |
+---------+ | | | | +------------+
| | | | | | | |
| Alice +-- ssh -l project2 --+ | +-----> project2 |
| | | | | |
+---------+ +---------------+ +------------+
Developers Docksal SSH Proxy Project Network
```
This image(s) is part of the [Docksal](http://docksal.io) image library.
## Features
* Project name routing
* Global keys that should be added to all projects.
* Project specific keys for added security
* Automatic connecting to Docksal Projects
## Usage
Generating the Volume for persistent storage:
```
docker volume create docksal_projects_ssh
```
Start the proxy container:
```
docker run -d \
--name=docksal-vhost-proxy \
--label "io.docksal.group=system" \
--restart=always \
-p "${DOCKSAL_VHOST_PROXY_PORT_SSH:-2222}":2222 \
--mount type=volume,src=docksal_projects_ssh,dst=/ssh-proxy \
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
docksal/ssh-proxy
```
## Container configuration
The SSH Proxy reads routing settings from container labels. The following labels are used:
`io.docksal.project-root`
Used for filtering out only docksal related projects.
`io.docksal.virtual-host`
Used for filtering out only the containers that have this label.
`com.docker.compose.project`
Used for returning the project name. This is also used for the username when ssh-ing through the
proxy.
`com.docker.compose.service`
This is used for searching for the container marked as `cli` within a project.
## Logging and debugging
The following container environment variables can be used to enabled various logging options.
`SSH_PROXY_LOGLEVEL` - Follow values of syslog logging. Settings values between 0 and 7 (default 3)
Check logs with `docker logs docksal-ssh-proxy`.