Hello @kodama ,
Thanks for reaching out to Microsoft QnA. happy to answer your query.
When you SSH into a VM from Azure Cloud shell, and run a shell script on the VM, post that if there are timeout issues on cloud shell, it can possibly be due to the script, if only your cloudshell session was not inactive for more than 20 minutes
The machine that provides your Cloud Shell session is temporary, and it is recycled after your session is inactive for 20 minutes. Cloud Shell requires an Azure file share to be mounted. As a result, your subscription must be able to set up storage resources to access Cloud Shell. Other considerations include:
With mounted storage, only modifications within the clouddrive directory are persisted. In Bash, your $HOME directory is also persisted.
Hope this helps.
References:
https://learn.microsoft.com/en-us/azure/cloud-shell/troubleshooting#system-state-and-persistence
--------------
Please accept as answer
and upvote
if the information provided above was helpful.