mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-10 11:10:27 +02:00
35 lines
385 B
Markdown
35 lines
385 B
Markdown
|
openssh
|
||
|
=======
|
||
|
|
||
|
## docker-compose.yml
|
||
|
|
||
|
```yaml
|
||
|
openssh:
|
||
|
image: vimagick/openssh
|
||
|
hostname: alpine
|
||
|
ports:
|
||
|
- "2222:22"
|
||
|
volumes:
|
||
|
- ./keys:/root/.ssh/keys
|
||
|
restart: always
|
||
|
```
|
||
|
|
||
|
## up and running
|
||
|
|
||
|
```bash
|
||
|
$ cd ~/fig/openssh/
|
||
|
|
||
|
$ tree keys
|
||
|
├── joe.pub
|
||
|
├── kev.pub
|
||
|
└── tom.pub
|
||
|
|
||
|
$ docker-compose up -d
|
||
|
```
|
||
|
|
||
|
## ssh login
|
||
|
|
||
|
```bash
|
||
|
$ ssh -p 2222 root@server
|
||
|
```
|