X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=src%2Finitscripts%2Finit.d%2Fsshd;h=1bd23460a89cff6de8d8e30576bf80d25cc0deba;hb=c81e9e4321a109c829dfb0a1bbb98a9fd0b63d2d;hp=eff98a9f2a3f2d6391cc8b27c5e7979c15207f8e;hpb=f9868791510f55440590ada7c4d1ebf7e6cbf0bd;p=people%2Fpmueller%2Fipfire-2.x.git diff --git a/src/initscripts/init.d/sshd b/src/initscripts/init.d/sshd index eff98a9f2a..1bd23460a8 100644 --- a/src/initscripts/init.d/sshd +++ b/src/initscripts/init.d/sshd @@ -12,7 +12,14 @@ case "$1" in start) - [ -e "/var/ipfire/remote/enablessh" ] || exit 0 # SSH is not enabled + if [ ! -e /etc/ssh/ssh_host_rsa_key ]; then + echo "Generating SSH Keys" + ssh-keygen -qf /etc/ssh/ssh_host_rsa_key -N '' + ssh-keygen -qf /etc/ssh/ssh_host_key -N '' -t rsa1 + ssh-keygen -qf /etc/ssh/ssh_host_dsa_key -N '' -t dsa + fi + + [ -e "/var/ipfire/remote/enablessh" ] || exit 0 # SSH is not enabled boot_mesg "Starting SSH Server..." # Also prevent ssh from being killed by out of memory conditions loadproc /usr/sbin/sshd