Created
October 14, 2016 02:04
-
-
Save inC3ASE/b85f306a679b8b9bcd2d3711134ac96b to your computer and use it in GitHub Desktop.
libexec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SSHDIR=/etc/ssh | |
[ ! -f ${SSHDIR}/ssh_host_key ] && ssh-keygen -q -t rsa1 -f ${SSHDIR}/ssh_host_key -N "" -C "" < /dev/null > /dev/null 2> /dev/null | |
[ ! -f ${SSHDIR}/ssh_host_rsa_key ] && ssh-keygen -q -t rsa -f ${SSHDIR}/ssh_host_rsa_key -N "" -C "" < /dev/null > /dev/null 2> /dev/null | |
[ ! -f ${SSHDIR}/ssh_host_dsa_key ] && ssh-keygen -q -t dsa -f ${SSHDIR}/ssh_host_dsa_key -N "" -C "" < /dev/null > /dev/null 2> /dev/null | |
[ ! -f ${SSHDIR}/ssh_host_ecdsa_key ] && ssh-keygen -q -t ecdsa -f ${SSHDIR}/ssh_host_ecdsa_key -N "" -C "" < /dev/null > /dev/null 2> /dev/null | |
[ ! -f ${SSHDIR}/ssh_host_ed25519_key ] && ssh-keygen -q -t ed25519 -f ${SSHDIR}/ssh_host_ed25519_key -N "" -C "" < /dev/null > /dev/null 2> /dev/null | |
exec /usr/sbin/sshd $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment