Get the order of things right; the keys need to be generated
early to allow entropy to replenish. sshd must start late to catch the full effects of ldconfig.
This commit is contained in:
parent
2265d5e30d
commit
20fb384ee0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57572
@ -608,11 +608,7 @@ network_pass3() {
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo creating ssh host key
|
||||
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
|
||||
echo now starting sshd
|
||||
else
|
||||
echo -n ' sshd';
|
||||
fi
|
||||
${sshd_program:-/usr/sbin/sshd} ${sshd_flags}
|
||||
;;
|
||||
esac
|
||||
|
||||
|
9
etc/rc
9
etc/rc
@ -395,6 +395,15 @@ case ${sendmail_enable} in
|
||||
;;
|
||||
esac
|
||||
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
if [ -x ${sshd_program:-/usr/sbin/sshd} ]; then
|
||||
echo -n ' sshd';
|
||||
${sshd_program:-/usr/sbin/sshd} ${sshd_flags}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
case ${usbd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
echo -n ' usbd'; /usr/sbin/usbd ${usbd_flags}
|
||||
|
@ -608,11 +608,7 @@ network_pass3() {
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo creating ssh host key
|
||||
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
|
||||
echo now starting sshd
|
||||
else
|
||||
echo -n ' sshd';
|
||||
fi
|
||||
${sshd_program:-/usr/sbin/sshd} ${sshd_flags}
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -608,11 +608,7 @@ network_pass3() {
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo creating ssh host key
|
||||
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
|
||||
echo now starting sshd
|
||||
else
|
||||
echo -n ' sshd';
|
||||
fi
|
||||
${sshd_program:-/usr/sbin/sshd} ${sshd_flags}
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -608,11 +608,7 @@ network_pass3() {
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo creating ssh host key
|
||||
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
|
||||
echo now starting sshd
|
||||
else
|
||||
echo -n ' sshd';
|
||||
fi
|
||||
${sshd_program:-/usr/sbin/sshd} ${sshd_flags}
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -608,11 +608,7 @@ network_pass3() {
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo creating ssh host key
|
||||
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
|
||||
echo now starting sshd
|
||||
else
|
||||
echo -n ' sshd';
|
||||
fi
|
||||
${sshd_program:-/usr/sbin/sshd} ${sshd_flags}
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -608,11 +608,7 @@ network_pass3() {
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo creating ssh host key
|
||||
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
|
||||
echo now starting sshd
|
||||
else
|
||||
echo -n ' sshd';
|
||||
fi
|
||||
${sshd_program:-/usr/sbin/sshd} ${sshd_flags}
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -608,11 +608,7 @@ network_pass3() {
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo creating ssh host key
|
||||
/usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
|
||||
echo now starting sshd
|
||||
else
|
||||
echo -n ' sshd';
|
||||
fi
|
||||
${sshd_program:-/usr/sbin/sshd} ${sshd_flags}
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user