1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
services:
qsshd:
build: .
container_name: qsshd-server
ports:
- "0.0.0.0:22222:22222"
volumes:
- qssh_etc:/etc/qssh
- qssh_home:/home
- qssh_logs:/var/log/qssh
environment:
- QSSH_LOG_LEVEL=info
- QSSH_MAX_CONNECTIONS=100
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/localhost/22222' 2>/dev/null"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
networks:
- qssh_network
# Client example (for testing)
qssh-client:
build: .
container_name: qssh-client
depends_on:
- qsshd
volumes:
- qssh_client_keys:/home/qssh/.qssh
environment:
- QSSH_LOG_LEVEL=info
networks:
- qssh_network
entrypoint: ["/bin/bash"]
command: ["-c", "sleep infinity"] # Keep container running for manual testing
profiles:
- client # Only start with --profile client
# QKD simulator (optional, for quantum key distribution testing)
qkd-simulator:
image: alpine:latest
container_name: qkd-simulator
ports:
- "127.0.0.1:8443:8443"
command: >
sh -c "
echo 'QKD Simulator running on port 8443';
echo 'This simulates a quantum key distribution endpoint';
nc -l -p 8443
"
networks:
- qssh_network
profiles:
- qkd # Only start with --profile qkd
networks:
qssh_network:
driver: bridge
ipam:
config:
- subnet: 172.21.0.0/16
volumes:
qssh_etc:
driver: local
qssh_home:
driver: local
qssh_client_keys:
driver: local
qssh_logs:
driver: local