Unable to connect the GCP instance via proxy

Hi Team,

I’m trying to create the image in GCP using packer, Packer is running in docker container. GCP instance has been created, but I am unable to ssh the remote instance and am getting a timeout. The GCP instance is behind the proxy server. I have a passing proxy option in Packer (ssh_proxy_host,ssh_proxy_port), but it is still not working . I also attempted to enable the proxy command in./.ssh/config, but it did not succeed. The same thing worked when I tried it in a local virtual machine using the proxy command. Would you kindly help me to solve this?

packer: 1.10.2
Docker: 23.0.1