Cannot connect to Compute Engine instance via SSH in linux -


this question have answer before that's windows. in linux.

i messed lot. please me solve issue.

i created ssh pair using ssh-keygen command copied , pasted id_rsa.pub vminstace ssh keys , saved. issued below command that's not going

gcloud compute --project "project001" ssh --zone "europe-west1-b" "instance-3" 

above command creates 2 file google_compute_engine , google_compute_engine.pub error :

permission denied (publickey,gssapi-keyex,gssapi-with-mic). 

you have added ssh public key (id_rsa.pub) instance metadata , gcloud command has added other public key (google_compute_engine.pub) project metadata.

however, instance metadata overrides project metadata trying ssh using non-authorized key.

therefore, propose 4 different solutions case:

1- use standard ssh client:

ssh -i $home/.ssh/id_rsa -o userknownhostsfile=/dev/null -o checkhostip=no -o stricthostkeychecking=no external_ip_address 

2- add google_compute_engine.pub key instance metadata , ssh instance using gcloud command.

3- remove ssh keys instance metadata , ssh instance running gcloud command.

4- ssh browser.

i hope helps.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -