title: Execute command in GCP VM instance ssh
body: <p>I am running java code in GCP VM instance. I want to execute</p>
  <pre><code>java main.java
  </code></pre>
  <p>in VM instance externally without manually ssh into VM. I tried with this code <a href="https://stackoverflow.com/questions/67778012/how-to-ssh-from-cloud-functions-to-a-gce-instance">here</a>
  , I have setup firewall to allow tcp port 22, but i am getting</p>
  <pre><code>ssh: connect to host xxx.xxx.xxx.xx port 22: Connection timed out
  </code></pre>
  <p>is there any other way to handle this or to resolve cloud function error ?</p>
  <p>Thanks in advance.</p>