summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjesper <jesper@FreeBSD.org>2001-05-16 19:23:54 +0000
committerjesper <jesper@FreeBSD.org>2001-05-16 19:23:54 +0000
commitd10919aae8027c31da548db63ce102264b6d83e1 (patch)
tree25c6e3176f17bb1423cf1c10d9ae00e8f6916f8b /etc
parent20a8339c87474057e6088b6a81778bf9f65380c3 (diff)
downloadFreeBSD-src-d10919aae8027c31da548db63ce102264b6d83e1.zip
FreeBSD-src-d10919aae8027c31da548db63ce102264b6d83e1.tar.gz
Link /etc/ssh/ssh_host_key to /etc/ssh/ssh_host_rsa_key to deal with
gratutious changes in the latest SSH Reviewed by: obrien Approved by: obrien
Diffstat (limited to 'etc')
-rw-r--r--etc/network.subr9
-rw-r--r--etc/rc.d/netoptions9
-rw-r--r--etc/rc.d/network19
-rw-r--r--etc/rc.d/network29
-rw-r--r--etc/rc.d/network39
-rw-r--r--etc/rc.d/routing9
-rw-r--r--etc/rc.network9
7 files changed, 49 insertions, 14 deletions
diff --git a/etc/network.subr b/etc/network.subr
index 26e3df0..65e79ae 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -721,8 +721,13 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
- echo ' creating ssh RSA host key';
- /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ if [ -f /etc/ssh/ssh_host_key ]; then
+ /bin/ln -s /etc/ssh/ssh_host_key /etc/ssh/ssh_host_rsa_key
+ /bin/ln -s /etc/ssh/ssh_host_key.pub /etc/ssh/ssh_host_rsa_key.pub
+ else
+ echo ' creating ssh RSA host key';
+ /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions
index 26e3df0..65e79ae 100644
--- a/etc/rc.d/netoptions
+++ b/etc/rc.d/netoptions
@@ -721,8 +721,13 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
- echo ' creating ssh RSA host key';
- /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ if [ -f /etc/ssh/ssh_host_key ]; then
+ /bin/ln -s /etc/ssh/ssh_host_key /etc/ssh/ssh_host_rsa_key
+ /bin/ln -s /etc/ssh/ssh_host_key.pub /etc/ssh/ssh_host_rsa_key.pub
+ else
+ echo ' creating ssh RSA host key';
+ /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
diff --git a/etc/rc.d/network1 b/etc/rc.d/network1
index 26e3df0..65e79ae 100644
--- a/etc/rc.d/network1
+++ b/etc/rc.d/network1
@@ -721,8 +721,13 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
- echo ' creating ssh RSA host key';
- /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ if [ -f /etc/ssh/ssh_host_key ]; then
+ /bin/ln -s /etc/ssh/ssh_host_key /etc/ssh/ssh_host_rsa_key
+ /bin/ln -s /etc/ssh/ssh_host_key.pub /etc/ssh/ssh_host_rsa_key.pub
+ else
+ echo ' creating ssh RSA host key';
+ /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
diff --git a/etc/rc.d/network2 b/etc/rc.d/network2
index 26e3df0..65e79ae 100644
--- a/etc/rc.d/network2
+++ b/etc/rc.d/network2
@@ -721,8 +721,13 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
- echo ' creating ssh RSA host key';
- /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ if [ -f /etc/ssh/ssh_host_key ]; then
+ /bin/ln -s /etc/ssh/ssh_host_key /etc/ssh/ssh_host_rsa_key
+ /bin/ln -s /etc/ssh/ssh_host_key.pub /etc/ssh/ssh_host_rsa_key.pub
+ else
+ echo ' creating ssh RSA host key';
+ /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
diff --git a/etc/rc.d/network3 b/etc/rc.d/network3
index 26e3df0..65e79ae 100644
--- a/etc/rc.d/network3
+++ b/etc/rc.d/network3
@@ -721,8 +721,13 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
- echo ' creating ssh RSA host key';
- /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ if [ -f /etc/ssh/ssh_host_key ]; then
+ /bin/ln -s /etc/ssh/ssh_host_key /etc/ssh/ssh_host_rsa_key
+ /bin/ln -s /etc/ssh/ssh_host_key.pub /etc/ssh/ssh_host_rsa_key.pub
+ else
+ echo ' creating ssh RSA host key';
+ /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index 26e3df0..65e79ae 100644
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -721,8 +721,13 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
- echo ' creating ssh RSA host key';
- /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ if [ -f /etc/ssh/ssh_host_key ]; then
+ /bin/ln -s /etc/ssh/ssh_host_key /etc/ssh/ssh_host_rsa_key
+ /bin/ln -s /etc/ssh/ssh_host_key.pub /etc/ssh/ssh_host_rsa_key.pub
+ else
+ echo ' creating ssh RSA host key';
+ /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
diff --git a/etc/rc.network b/etc/rc.network
index 26e3df0..65e79ae 100644
--- a/etc/rc.network
+++ b/etc/rc.network
@@ -721,8 +721,13 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
- echo ' creating ssh RSA host key';
- /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ if [ -f /etc/ssh/ssh_host_key ]; then
+ /bin/ln -s /etc/ssh/ssh_host_key /etc/ssh/ssh_host_rsa_key
+ /bin/ln -s /etc/ssh/ssh_host_key.pub /etc/ssh/ssh_host_rsa_key.pub
+ else
+ echo ' creating ssh RSA host key';
+ /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
echo ' creating ssh DSA host key';
OpenPOWER on IntegriCloud