run 482 B

123456789101112131415
  1. #!/bin/sh
  2. if ! test -d /data/ssh
  3. then
  4. mkdir -p /data/ssh
  5. ssh-keygen -q -f /data/ssh/ssh_host_key -N '' -t rsa1
  6. ssh-keygen -q -f /data/ssh/ssh_host_rsa_key -N '' -t rsa
  7. ssh-keygen -q -f /data/ssh/ssh_host_dsa_key -N '' -t dsa
  8. ssh-keygen -q -f /data/ssh/ssh_host_ecdsa_key -N '' -t ecdsa
  9. ssh-keygen -q -f /data/ssh/ssh_host_ed25519_key -N '' -t ed25519
  10. chown -R root:root /data/ssh/*
  11. chmod 600 /data/ssh/*
  12. fi
  13. exec gosu root /usr/sbin/sshd -D -f /app/gogs/docker/sshd_config