i have created 3 instance in a GCP instance group with the same VPC. I am trying to move files between them using scp however it is not working. Neither gets any output nor any error message. I have already added the machines in their respective host files.
Asked
Active
Viewed 1,161 times
0

Grzenio
- 35,875
- 47
- 158
- 240

Parth Gandhi
- 311
- 8
- 16
-
1Can you paste a screenshot of your firewall rules? – guillaume blaquiere Nov 29 '19 at 12:53
-
Putting two VMs in an instance group does not automatically make them able to communicate with each other. – Travis Webb Dec 01 '19 at 07:53
1 Answers
1
Problem #1 - Ping does not work.
You need to create a firewall rule allowing traffic on ICMP. This is a different protocol and requires its own firewall rule. However, a ping error is not related to an SSH/SCP error.
Problem #2 - SSH/SCP between instances in an instance group.
You need two items set up:
- A firewall rule allowing traffic between the instances on TCP port 22.
- SSH keys set up allowing SSH access. You will need to manually create SSH key pairs for GCE -> GCE file copies and set up both sides in your instance group for each instance with the correct public and private keys.
For Managed Instance Groups, do not copy files between instances for data that you need to preserve. Copy these files to Google Cloud Storage. Google Compute Engine instances under that control of a Managed Instance Group are ephemeral and can be destroyed and recreated at any time. For data that has value, use Cloud Storage. If this is a manual instance group, I would still use Cloud Storage for data transfers instead of SSH/SCP.

John Hanley
- 74,467
- 6
- 95
- 159