Don't try to generate ssh keys if ssh isn't installed.

This commit is contained in:
Dag-Erling Smørgrav 2002-03-19 03:45:02 +00:00
parent 0e3c27aef0
commit dde1888c4a
7 changed files with 77 additions and 49 deletions

View File

@ -847,13 +847,17 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key
if [ -x /usr/bin/ssh-keygen ]; then
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -trsa1 -N "" \
-f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -tdsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
fi
;;
esac

View File

@ -847,13 +847,17 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key
if [ -x /usr/bin/ssh-keygen ]; then
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -trsa1 -N "" \
-f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -tdsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
fi
;;
esac

View File

@ -847,13 +847,17 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key
if [ -x /usr/bin/ssh-keygen ]; then
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -trsa1 -N "" \
-f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -tdsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
fi
;;
esac

View File

@ -847,13 +847,17 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key
if [ -x /usr/bin/ssh-keygen ]; then
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -trsa1 -N "" \
-f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -tdsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
fi
;;
esac

View File

@ -847,13 +847,17 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key
if [ -x /usr/bin/ssh-keygen ]; then
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -trsa1 -N "" \
-f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -tdsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
fi
;;
esac

View File

@ -847,13 +847,17 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key
if [ -x /usr/bin/ssh-keygen ]; then
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -trsa1 -N "" \
-f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -tdsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
fi
;;
esac

View File

@ -847,13 +847,17 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key
if [ -x /usr/bin/ssh-keygen ]; then
if [ ! -f /etc/ssh/ssh_host_key ]; then
echo ' creating ssh RSA host key';
/usr/bin/ssh-keygen -trsa1 -N "" \
-f /etc/ssh/ssh_host_key
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
/usr/bin/ssh-keygen -tdsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
fi
;;
esac