summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/sshd
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.d/sshd')
-rwxr-xr-xetc/rc.d/sshd11
1 files changed, 10 insertions, 1 deletions
diff --git a/etc/rc.d/sshd b/etc/rc.d/sshd
index fd95d5a..9f00199 100755
--- a/etc/rc.d/sshd
+++ b/etc/rc.d/sshd
@@ -70,12 +70,20 @@ sshd_keygen()
fi
if [ -f /etc/ssh/ssh_host_rsa_key ]; then
- echo "You already have a RSA host key" \
+ echo "You already have an RSA host key" \
"in /etc/ssh/ssh_host_rsa_key"
echo "Skipping protocol version 2 RSA Key Generation"
else
/usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
fi
+
+ if [ -f /etc/ssh/ssh_host_ecdsa_key ]; then
+ echo "You already have an ECDSA host key" \
+ "in /etc/ssh/ssh_host_ecdsa_key"
+ echo "Skipping protocol version 2 ECDSA Key Generation"
+ else
+ /usr/bin/ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''
+ fi
)
}
@@ -83,6 +91,7 @@ sshd_precmd()
{
if [ ! -f /etc/ssh/ssh_host_key -o \
! -f /etc/ssh/ssh_host_dsa_key -o \
+ ! -f /etc/ssh/ssh_host_ecdsa_key -o \
! -f /etc/ssh/ssh_host_rsa_key ]; then
user_reseed
run_rc_command keygen
OpenPOWER on IntegriCloud