From a6ec7718ab1c38dc688b289a4233c536f64a0e10 Mon Sep 17 00:00:00 2001 From: Dmitry Badovsky Date: Tue, 28 Oct 2025 16:51:24 +0000 Subject: [PATCH] Update vmcreate.sh --- vmcreate.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vmcreate.sh b/vmcreate.sh index 02bfcdd..e7c2136 100644 --- a/vmcreate.sh +++ b/vmcreate.sh @@ -227,6 +227,10 @@ if [ $pubkey ]; then else read -p "Public key not specified. Use default? Enter to continue or Ctrl+C to abort" fi +if [[ (head -c 7 "$pubkey") -ne "ssh-rsa" ]]; then + echo "$pubkey is not a valid public key. Make sure you specified PUBLIC key." + exit 6 +fi # Проверяем, что нет ВМ в списке и нет сниппетов for line in $(cat hosts.tmp)