Difficulty to force glcoud compute to use only the ssh agent sock

mlongarai
mlongarai
Community Member
edited September 2022 in SSH

Hi everyone,

New joiner here, but old user from 1password.
I'm facing difficulty to force glcoud to use only the ssh agent sock set from config file. It works for all other environments easily.

  • The key is stored in 1Password vault
  • The path for the agent sock is configured in config file

The command to login into a vm on GCP:

gcloud compute ssh --zone "xxxxxxxxx" "xxxxxxxx" --tunnel-through-iap --project "xxxx"

Something strange happens, when the gcloud key exists in the 1password vault, I am asked for the touch id to use the key stored there.
But if I delete the key from the /.ssh/ folder gcloud authentication no longer works and prompts me to create a new key.

For some reason gcloud need to see the ssh key in the directory, if not it will request to create one.

Any help is greatly appreciated,

Thank you!


1Password Version: 1Password for Mac 8.9.4
Extension Version: 80904044
OS Version: macOS Monterey 12.6
Browser:_ Not Provided
Referrer: forum-search:Difficulty to force glcoud to use only the ssh agent

Comments

  • You can use the --plain flag to disable the assumptions that the gcloud compute ssh command makes about your local SSH setup. Other useful flags are --ssh-flag to add flags to the underlying SSH command (e.g. --ssh-flag='-v') and --dry-run which is helpful for debugging.

This discussion has been closed.