Vauxoo / travis2docker

This is a Library to transform travis to docker file
BSD 2-Clause "Simplified" License
13 stars 15 forks source link

[IMP] Add support for ed25519 keys and prefer them over RSA #194

Closed antonag32 closed 1 year ago

antonag32 commented 1 year ago

Fixes #193 The container automatically copies the user's public key to its authorized_keys, allowing users to connect via SSH.

id_rsa.pub was the default key the Dockerfile looked for, since it is deprecated (in favor of ed25519) a new script (function) "set_authorized_keys" was added.

This script:

  1. Tries to first copy id_ed25519.pub (if it exists)
  2. If it does not, it falls back to RSA keys and prints a deprecation warning (if it exists).
  3. Otherwise it alerts the user to the fact nothing was copied.

Also, since the condition add_self_rsa_pub was hardcoded to True, it was removed and the keys are just copied directly.

antonag32 commented 1 year ago

@luisg123v @moylop260 can you review?