From 44fa027951545eece09cc308e437cf022fac3446 Mon Sep 17 00:00:00 2001 From: Scott McCreary Date: Wed, 14 Apr 2010 06:35:35 +0000 Subject: [PATCH] Added the openssh post_install keygen script. Applied with the following Haiku: Openssh Uses this bash post install Script to make the keys --- net-misc/openssh/boot/post_install/ssh.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 net-misc/openssh/boot/post_install/ssh.sh diff --git a/net-misc/openssh/boot/post_install/ssh.sh b/net-misc/openssh/boot/post_install/ssh.sh new file mode 100755 index 000000000..2667bbad3 --- /dev/null +++ b/net-misc/openssh/boot/post_install/ssh.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# generate SSH host keys + +ETCSSHDIR=`finddir B_COMMON_ETC_DIRECTORY`/ssh +mkdir -p ${ETCSSHDIR} + +hostKeyDir=${ETCSSHDIR} + +if [ ! -f "$hostKeyDir/ssh_host_key" ] ; then + ssh-keygen -t rsa1 -f "$hostKeyDir/ssh_host_key" -N "" +fi + +if [ ! -f "$hostKeyDir/ssh_host_dsa_key" ] ; then + ssh-keygen -t dsa -f "$hostKeyDir/ssh_host_dsa_key" -N "" +fi + +if [ ! -f "$hostKeyDir/ssh_host_rsa_key" ] ; then + ssh-keygen -t rsa -f "$hostKeyDir/ssh_host_rsa_key" -N "" +fi