I have a google v3-8 TPU, i can't figure out how to connect to it using ssh in windows.
I did every guide there is, but the connection just times out.
What i tried (among others):
1.
Dos command line:
gcloud config set compute/zone europe-west4-a
gcloud config set account [email protected]
gcloud config set project myprojectname
gcloud services enable tpu.googleapis.com
gcloud alpha compute tpus tpu-vm ssh --zone europe-west4-a vm_name
This just opens Putty which then timeouts.
Create a pub/priv key using Puttygen and adding the public key in the (2a)Google Cloud Platform website > Compute Engine Metadata > SSH keys
Adding the same key to ~/.ssh/google_compute_engine.pub , and private key to ~/.ssh/google_compute_engine on the TPU VM using the web-console of GCP.
(The key files where empty)
When connecting with putty it timeouts
Did step 1. but with this as the last line.
gcloud alpha compute tpus tpu-vm ssh --zone europe-west4-a vm_name --ssh-key-file=C:\Users\my_username\Documents\putty_keys\gc
(there are three files, gcloud adds the extensions, gc.pub with the public key, gc with the private key, and gc.ppk )
Putty does not connect.
Did the reverse, created the ssh-keys on the TPU server using ssh-gen renamed keys to ~/.ssh/google_compute_engine.pub , and private key to ~/.ssh/google_compute_engine
Copy pasted them to putty-gen to convert to windows putty keys, added keys using (2a)
Connected putty to vm outside-ip and nothing.
Created the ssh-keys on the TPU server using ssh-gen adding them to ~/.ssh/authorized_keys and installing them with ssh-copy-id and entering password
Copied the keys to puttygen and used them to connect to VM ip.
I did more to connect, but to no avail.
What is the right way to connect to a TPU VM ?
Note, it's not a Compute VM, it's a TPU. not the same settings as a VM in GCP console, so no nice add ssh key in the edit settings, because there ARE NO edit settings in GCPC.
I'm at a loss.
PS threw away the TPU instance and recreated it after each step, to make sure i wasn't messing things up too badly.
/EDIT:
i fixed it using this batch file
ECHO OFF
CLS
SET PATH=C:\Users\username\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin;%PATH%;
cd C:\Users\username\AppData\Local\Google\Cloud SDK
call gcloud config set compute/zone europe-west4-a
call gcloud config set account [email protected]
call gcloud config set project projectname
gcloud alpha compute tpus tpu-vm ssh --zone europe-west4-a username@TPU_VM