mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-05 18:05:16 +00:00
Create a DSA host key if one does not already exist, and teach sshd_config
about it.
This commit is contained in:
parent
4fc9354419
commit
0c11f6e187
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60578
@ -7,6 +7,7 @@ Port 22
|
||||
#ListenAddress 0.0.0.0
|
||||
#ListenAddress ::
|
||||
HostKey /etc/ssh/ssh_host_key
|
||||
HostKey /etc/ssh/ssh_dsa_host_key
|
||||
ServerKeyBits 768
|
||||
LoginGraceTime 60
|
||||
KeyRegenerationInterval 3600
|
||||
|
@ -621,10 +621,15 @@ network_pass3() {
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo ' creating ssh host key';
|
||||
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
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo '.'
|
||||
|
@ -621,10 +621,15 @@ network_pass3() {
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo ' creating ssh host key';
|
||||
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
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo '.'
|
||||
|
@ -621,10 +621,15 @@ network_pass3() {
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo ' creating ssh host key';
|
||||
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
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo '.'
|
||||
|
@ -621,10 +621,15 @@ network_pass3() {
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo ' creating ssh host key';
|
||||
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
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo '.'
|
||||
|
@ -621,10 +621,15 @@ network_pass3() {
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo ' creating ssh host key';
|
||||
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
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo '.'
|
||||
|
@ -621,10 +621,15 @@ network_pass3() {
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo ' creating ssh host key';
|
||||
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
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo '.'
|
||||
|
@ -621,10 +621,15 @@ network_pass3() {
|
||||
case ${sshd_enable} in
|
||||
[Yy][Ee][Ss])
|
||||
if [ ! -f /etc/ssh/ssh_host_key ]; then
|
||||
echo ' creating ssh host key';
|
||||
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
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo '.'
|
||||
|
Loading…
x
Reference in New Issue
Block a user