docker-bastion
docker-bastion copied to clipboard
Instructions incorrect in readme
Server listening on 0.0.0.0 port 22.
User bastion authorized keys /var/lib/bastion/authorized_keys is not a regular file
Connection closed by authenticating user bastion 172.19.0.1 port 38242 [preauth]
This is because authorized_keys is a directory, and not a file.
Thanks for reporting! Would you describe in more detail the error that you have?
By default your docker-compose example create a folder for the auth keys. It should be a file.
Per your example config:
volumes:
- $PWD/authorized_keys:/var/lib/bastion/authorized_keys:ro
This is incorrect. It will attempt to mount a directory when it needs to be a file.
Per the rest of the documentation:
Add rsa public key to .bastion_keys file
$ cat $HOME/.ssh/id_rsa.pub > $PWD/.bastion_keys
".bastion_keys" is never referenced elsewhere.
A "working" config (working is in quotes because you still cannot SSH due to #7) would be:
environment:
AUTHORIZED_KEYS: "/var/lib/bastion/config/authorized_keys"
volumes:
- $PWD/config:/var/lib/bastion/config:ro
Assuming the "authorized_keys" file was placed in $PWD/config.