Categorygithub.com/CPCTF2022/ssh-separator
modulepackage
1.0.4
Repository: https://github.com/cpctf2022/ssh-separator.git
Documentation: pkg.go.dev

# README

ssh-separator

swagger codecov go report

Tool to distribute ssh connections to docker containers for each user

Requirement

  • docker

Usage

Launch

It can be started using docker. For more information about environment variables, please see Environment Variables.

example

$ wget https://github.com/CPCTF2022/ssh-separator/raw/main/docker-compose.yaml
$ docker compose up

REST API

You can add users and reset the container for users via REST API. See OpenAPI for details.

Environment Variables

variabledescriptionexample value
WELCOMEThe string displayed upon successful login.Login success!
API_KEYAPI key for REST API.aeneexiene7uu3fie4pa
API_PORTPort for REST API3000
SSH_PORTPort for ssh2222
IMAGE_NAMEDocker image for user containermazrean/cpctf-ubuntu:latest
IMAGE_USERUsername in user containers.ubuntu
IMAGE_CMDShell in user containers./bin/bash
CPU_LIMITThe number of CPUs to allocate to user containers.0.5
MEMORY_LIMITMemory limits for user containers.1024
PIDS_LIMITLimit the number of processes to user containers-1
BADGER_DIRDirectory where user data is stored./var/lib/ssh-separator
PROMETHEUSIf true, provide metrics for prometheus.true

Author

Shunsuke Wakamatsu (a.k.a mazrean)

Licence

MIT

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
go:generate mockgen -source=$GOFILE -destination=mock_$GOPACKAGE/mock_$GOFILE.
go:generate mockgen -source=$GOFILE -destination=mock_$GOPACKAGE/mock_$GOFILE.
No description provided by the author
go:generate mockgen -source=$GOFILE -destination=mock_$GOPACKAGE/mock_$GOFILE.
go:generate mockgen -source=$GOFILE -destination=mock_$GOPACKAGE/mock_$GOFILE.

# Functions

No description provided by the author
No description provided by the author

# Structs

No description provided by the author