|
|
|
@ -1,8 +1,9 @@
@@ -1,8 +1,9 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
# This won't be executed if keys already exist (i.e. from a volume) |
|
|
|
|
ssh-keygen -t ecdsa -f /etc/ssh/host_keys/ssh_host_ecdsa_key |
|
|
|
|
ssh-keygen -t df25519 -f /etc/ssh/host_keys/ssh_host_ed25519_key |
|
|
|
|
|
|
|
|
|
[ ! -f /etc/ssh/host_keys/ssh_host_ecdsa_key ] && ssh-keygen -t ecdsa -f /etc/ssh/host_keys/ssh_host_ecdsa_key |
|
|
|
|
[ ! -f /etc/ssh/host_keys/ssh_host_ed25519_key] && ssh-keygen -t ed25519 -f /etc/ssh/host_keys/ssh_host_ed25519_key |
|
|
|
|
|
|
|
|
|
# Copy authorized keys from ENV variable |
|
|
|
|
echo "$AUTHORIZED_KEYS" >$AUTHORIZED_KEYS_FILE |
|
|
|
|