Generate new sshd host key when necessary. I'm tired of
waiting for someone to commit this. :)
This commit is contained in:
parent
5dffca5013
commit
e15679d81e
@ -605,7 +605,13 @@ network_pass3() {
|
||||
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
echo -n ' sshd';
|
||||
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
|
||||
|
@ -605,7 +605,13 @@ network_pass3() {
|
||||
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
echo -n ' sshd';
|
||||
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
|
||||
|
@ -605,7 +605,13 @@ network_pass3() {
|
||||
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
echo -n ' sshd';
|
||||
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
|
||||
|
@ -605,7 +605,13 @@ network_pass3() {
|
||||
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
echo -n ' sshd';
|
||||
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
|
||||
|
@ -605,7 +605,13 @@ network_pass3() {
|
||||
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
echo -n ' sshd';
|
||||
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
|
||||
|
@ -605,7 +605,13 @@ network_pass3() {
|
||||
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
echo -n ' sshd';
|
||||
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
|
||||
|
@ -605,7 +605,13 @@ network_pass3() {
|
||||
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
echo -n ' sshd';
|
||||
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…
x
Reference in New Issue
Block a user