bastillion-io / Bastillion

Bastillion is a web-based SSH console that centrally manages administrative access to systems. Web-based administration is combined with management and distribution of user's public SSH keys.

Home Page:https://www.bastillion.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bastillion deletes any other ssh key from authorized_keys

kais2019 opened this issue · comments

I noticed, that Bastillion deletes systems authorized_keys file everytime anythung is changed and write it new.

Thats not optimal, because I use some server that communicate with each other using ssh.
So the initial authorized_keys file of this servers includes some ssh keys that must stay in place.

Is there a chance to keep them save?

Maybe a kind of marker in the authorized_keys file, so that Bastillion will not cahnge content above this marker-line?

Best regards,
Kai

Hi there Kai.

Totally new to Bastillion but this maybe define two authorized key files (one user managed, another Bastillion managed)?: https://serverfault.com/questions/1000636/how-can-i-have-multiple-authorized-keys-files

Duck-Duck_Go'd "multiple authorized_keys files" to find the above.

Confirm, I used the same approach, just created another authorized_keys2 file for extra keys

Use case: I want the authorized key file to contain keys from other clients like my laptop, for example. Currently, Bastillion overwrites all keys in the authorized key file except for its own.

The suggested solution from this thread:

  1. Create the authorized_keys2 file and populate it with desired keys
  2. Verify that it works
  3. Login with Bastillion

Annoyingly, after step 3, Bastillion actually deletes the authoized_keys2 file along with resetting the authorized_keys file. Any ideas?

Update: this is covered clearly in the documentation which I missed. Check out the details here.