X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage3%2Fbootscripts%2Fsshd;h=66d635cc6223d283270365aa53241afa1cda0125;hb=2121ae9154ff063eef0defe0a9208663062a2d01;hp=1d3ab9fa8804917135985bd9da9ffd87bdef5984;hpb=2f26e347a05e245d6f57cb6603a7a51a4418b80d;p=hvlinux.git diff --git a/stage3/bootscripts/sshd b/stage3/bootscripts/sshd index 1d3ab9f..66d635c 100755 --- a/stage3/bootscripts/sshd +++ b/stage3/bootscripts/sshd @@ -13,23 +13,21 @@ DAEMON="/usr/sbin/sshd" DAEMON_DESC="SSH server" DAEMON_OPTS="-4" +KEYLEN_BITS=4096 + # Check if SSH server is desired if [ "x${SSH_SERVER_ENA}" != "xyes" -a "x${SSH_SERVER_ENA}" != "xYes" -a "x${SSH_SERVER_ENA}" != "xYES" ]; then exit ${EXIT_CODE_SUCCESS} fi gen_keys() { - if [ ! -e /etc/ssh/ssh_host_key ] ; then - echo "Generating Hostkey..." - /usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N '' - fi - if [ ! -e /etc/ssh/ssh_host_dsa_key ] ; then - echo "Generating DSA-Hostkey..." - /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' - fi if [ ! -e /etc/ssh/ssh_host_rsa_key ] ; then - echo "Generating RSA-Hostkey..." - /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' + echo "Generating RSA hostkey..." + /usr/bin/ssh-keygen -t rsa -b ${KEYLEN_BITS} -f /etc/ssh/ssh_host_rsa_key -N '' + fi + if [ ! -e /etc/ssh/ssh_host_ed25519_key ] ; then + echo "Generating Ed25519 hostkey..." + /usr/bin/ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N '' fi }