Skip to content

Commit 582892a

Browse files
committed
sshvm script stored
1 parent 6cb267c commit 582892a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

setup-vm.sh

+4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ echo "az vm delete --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_VM_NAME -
4444
echo "az group delete --name $MY_RESOURCE_GROUP_NAME --yes" >> "destroyvm-$RANDOM_ID"
4545
chmod +x "destroyvm-$RANDOM_ID"
4646

47+
echo '#!/bin/bash' > "sshvm-$RANDOM_ID"
48+
echo "az ssh vm -n $MY_VM_NAME -g $MY_RESOURCE_GROUP_NAME --local-user azureuser" >> "sshvm-$RANDOM_ID"
49+
chmod +x "sshvm-$RANDOM_ID"
50+
4751
echo
4852
echo "VM created. You can now connect to it using 'sshvm' command"
4953
echo "To destroy the VM, run 'destroyvm-$RANDOM_ID'"

0 commit comments

Comments
 (0)