#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
set -e
# Make sure we don't write to stdout, since in case of
# socket activation, it goes to the remote side (#19589).
exec >&2

if ! [ -s "/etc/ssh/ssh_host_rsa_key" ]; then
    if ! [ -h "/etc/ssh/ssh_host_rsa_key" ]; then
        rm -f "/etc/ssh/ssh_host_rsa_key"
    fi
    mkdir -p "$(dirname '/etc/ssh/ssh_host_rsa_key')"
    chmod 0755 "$(dirname '/etc/ssh/ssh_host_rsa_key')"
    ssh-keygen \
      -t "rsa" \
      -b 4096 \
       \
       \
       \
      -f "/etc/ssh/ssh_host_rsa_key" \
      -N ""
fi
if ! [ -s "/etc/ssh/ssh_host_ed25519_key" ]; then
    if ! [ -h "/etc/ssh/ssh_host_ed25519_key" ]; then
        rm -f "/etc/ssh/ssh_host_ed25519_key"
    fi
    mkdir -p "$(dirname '/etc/ssh/ssh_host_ed25519_key')"
    chmod 0755 "$(dirname '/etc/ssh/ssh_host_ed25519_key')"
    ssh-keygen \
      -t "ed25519" \
       \
       \
       \
       \
      -f "/etc/ssh/ssh_host_ed25519_key" \
      -N ""
fi



