You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gce-discussion
Hi All,
My TEST setup:
I have 8 VMs under my project.
I also have one static IP assigned to one of the VM (say VM1), rest VMs (VM2-VM8) are having ephemeral IPs.
I have gcloud setup on my linux machine and ssh setup to connect to static ip VM with "google_compute_engine" keys generated.
I can successfully SSH in from my desktop linux instance to gcp static ip instance.
I can ping rest of the VMs from gcp fine.
Question:
I want to be able to ssh in from VM1 to rest of VMs using the same key.
How can I do this?
Thanks,
DP.
Kamelia Y
unread,
Mar 30, 2020, 2:22:26 PM3/30/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gce-discussion
Hi,
First you need to define the public and private key in the VM that you want to SSH from. In your use case you should define in the VM1. Then you need to add this public key into the other VMs.
Then you should connect to your VM that you want to SSH from and run the following command:
- ssh -i path-to-private-key username@external-ip
Max Illfelder
unread,
Mar 31, 2020, 12:21:32 AM3/31/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gce-discussion
Hi,
A simpler solution is using SSH agent forwarding - this allows you to use your configured SSH key to connect to VM1, and then connect using the same authentication with all of your other instances. You can use SSH agent forwarding by specifying the "-A" flag in your original SSH request to VM1.