General process:
- Log in to GCP and create a VM instance (not registered with GCP, see my registration process)
- Example Change the type of an external IP address
- Modify the configuration file to allow the root user to log in to the system
- Download the SSH tool to connect to the VM instance
Specific process:
Step one, log in to GCP,Navigation menu— – >Compute Engine— – >Vm Instance
Second, click Create Instance
The third step, the name can be named, but suggest a recognizable name and region can choose in the Asian region, near the China server, speed will be faster, I choose here is the registration area is the same with me, the machine configuration can choose according to their needs, here I choose his default configuration. Before the free use of a year, need to calculate the amount of consumption, now only 90 days free, you can choose freely also afraid. Still advocate reasonable consumption however, waste resources at will shameful!
Step 4, start the disk and click the Change button
Fifth step, choose your own system, I choose CentOS 7, which is compatible with most tools installation. The default startup disk type is ok. You can also choose the disk type and capacity according to your own needs
When configuring available or zone persistent disks, you can select one of the following disk types.
- Standard permanent disks (PD-standard) are supported by standard common hard disks (HDDS).
- Pd-balanced permanent disks are supported by solid state disks (SSDS). They are an alternative to SSD permanent disks that balance performance and cost.
- SSD Permanent disks (PD-SSDs) are supported by solid state disks (SSDS).
- Pd-extreme disks are supported by solid state drives (SSDS). With consistent high performance over random access workloads and batch throughput, extreme persistence disks are designed for high-end database workloads. Unlike other disk types, you can pre-configure the DESIRED IOPS.
Check out the official guide for more details
Step 6: Select identity and API access by default. Check all firewalls. And I’m gonna go ahead and say Create
Step 7, wait for completion, and the instance status changes to a green √ in about a few minutes
Step 8 change the external IP address type. Choose VPC Network > External IP Address
PS: If you do not want to change the static IP address, you can change the external IP address without restarting the instance
Step 9, select the corresponding instance and change the type from temporary to static
Step 10, enter the new IP address, the name is optional
Step 11: Modify to allow the system to log in as the root user, return to the instance interface, directly click SSH or click the triangle arrow drop-down in the browser window to open and enter the instance.
Step 12: After successful connection, use Google Cloud Web VERSION SSH
Step 13: Enter the command sudo -i to switch to root
Step 14: Edit the SSH configuration filevi /etc/ssh/sshd_config
Step 15: Modify the following information and press ESC, :wq to save and exit
- PermitRootLogin yes
- PasswordAuthentication yes
Run the following command to restart SSH: service SSHD restart Step 17 Run the sudo passwd root command to set the new password of user root
Step 18: Download and install the FinalShell SSH tool, obtain the installation package, and run the software after the installation. Click Open folder, click New button, select SSH Connection (Linux)
Step 19: Enter the connection information. The name is optional. If there are too many instances, it is recommended to enter the corresponding instance name to avoid confusion. Set host to the external IP address of the instance, port 22 by default, user name to root, password to the newly changed password, and click OK
Step 20: When the connection is successful, the following picture will appear, and relevant files, directories and system running information can be obtained on the main page