diff options
Diffstat (limited to 'scripts/ssh-server-key')
-rwxr-xr-x | scripts/ssh-server-key | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/scripts/ssh-server-key b/scripts/ssh-server-key index 9712393..949d314 100755 --- a/scripts/ssh-server-key +++ b/scripts/ssh-server-key @@ -5,11 +5,10 @@ regen_host_keys () sudo /etc/init.d/ssh restart } -while true; do - read -p "Do you really want to remove the existing SSH host keys? " yn - case $yn in - [Yy]* ) regen_host_keys; break;; - [Nn]* ) exit;; - * ) echo "Please answer yes or no.";; - esac -done +echo "Do you really want to remove the existing SSH host keys? " +${vyatta_bindir}/yesno + +if [ $? -eq 0 ] +then + regen_host_keys +fi |