Generate new sshd host key when necessary. I'm tired of
waiting for someone to commit this. :)
This commit is contained in:
parent
079654e8e2
commit
49923df12d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57567
@ -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…
Reference in New Issue
Block a user