3 # Create files for SSH server
10 # Generate new keys so nobody else can login as this user. Host keys would be
11 # safe to commit but lets not needlessly commit private keys anyway.
12 if ! test -e sshd/ssh_host_key; then
13 ssh-keygen -q -t ed25519 -N '' -f sshd/ssh_host_key
15 if ! test -e ssh/id_ed25519; then
16 ssh-keygen -q -t ed25519 -N '' -f ssh/id_ed25519
18 if ! test -e ssh/authorized_keys; then
19 cat ssh/id_ed25519.pub > ssh/authorized_keys
21 if ! test -e ssh/known_hosts; then
22 printf '[127.0.0.1]:29327 ' > ssh/known_hosts
23 cat sshd/ssh_host_key.pub >> ssh/known_hosts