Solve the problem that PhpStorm fails to connect to VirtualBox

Solve the problem that PhpStorm fails to connect to VirtualBox

Problem description: When phpstorm's SFTP host is set to 192.168.122.1, it cannot be connected, but it can be opened normally in the virtual machine.

1. Open VirtualBox, go to Settings->Network, and select Bridged Network Card as the connection method.
(If you can't choose, you can refer to this page)
(If the installation of the bridge network card service fails, you can try to update the driver and install it again)

insert image description here

2. Enter ifconfig in the console, find the address of inet in the second line starting with enp0s3, and then change the SFTP host in phpstorm to this address. In my case, it is 192.168.1.4
10.0.2.15 may not work. If it does not work, restart and then ifconfig

insert image description here

3. Restart the virtual machine and then connect

insert image description here

If you still can’t connect, you can try the following steps again:

1. Close the Windows system firewall
2. CentOS firewall is closed systemctl stop firewalld.service

Summarize

This is the end of this article about a solution to the problem of PhpStorm failing to connect to VirtualBox. For more information about PhpStorm failing to connect to VirtualBox, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Solution to the problem that the virtualbox virtual machine cannot connect to the external network in NAT mode
  • Detailed explanation of how to configure the network connection between the guest and host in VirtualBox
  • A tutorial on how to use VirtualBox to connect a virtual machine to the network

<<:  Detailed explanation of the execution process of mysql update statement

>>:  Vue+Websocket simply implements the chat function

Recommend

Determine the direction of mouse entry based on CSS

In a front-end technology group before, a group m...

Building command line applications with JavaScript

Table of contents 1. Install node 2. Install Comm...

Detailed explanation of several methods of JS array dimensionality reduction

Dimensionality reduction of two-dimensional array...

How to place large images in a small space on a web page

Original source: www.bamagazine.com There are nar...

uniapp project optimization methods and suggestions

Table of contents 1. Encapsulate complex page dat...

Detailed explanation of the functions and usage of MySQL common storage engines

This article uses examples to illustrate the func...

Two ways to create SSH server aliases in Linux

Preface If you frequently access many different r...

Analysis of Mysql transaction characteristics and level principles

1. What is a transaction? A database transaction ...

How to use watch listeners in Vue2 and Vue3

watch : listen for data changes (change events of...

Problems and solutions of using TweenMax animation library in angular

I have nothing to do recently, so I tinker with C...

How to automatically delete records before a specified time in Mysql

About Event: MySQL 5.1 began to introduce the con...

View the port number occupied by the process in Linux

For Linux system administrators, it is crucial to...

Detailed explanation of Linux zabbix agent deployment and configuration methods

1. Install zabbix-agent on web01 Deploy zabbix wa...