docker-bastion icon indicating copy to clipboard operation
docker-bastion copied to clipboard

Instructions incorrect in readme

Open Slyke opened this issue 5 years ago • 3 comments

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.

Slyke avatar Jan 24 '20 07:01 Slyke

Thanks for reporting! Would you describe in more detail the error that you have?

binlab avatar May 31 '20 19:05 binlab

By default your docker-compose example create a folder for the auth keys. It should be a file.

xXcoronaXx avatar Mar 30 '21 09:03 xXcoronaXx

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.

swichers avatar Sep 21 '21 00:09 swichers