0

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.

enter image description here

Grzenio
  • 35,875
  • 47
  • 158
  • 240
Parth Gandhi
  • 311
  • 8
  • 16

1 Answers1

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:

  1. A firewall rule allowing traffic between the instances on TCP port 22.
  2. 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