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

How to use positioning to center elements (web page layout tips)

How to center an element in the browser window He...

How to make your browser talk with JavaScript

Table of contents 1. The simplest example 2. Cust...

In-depth explanation of Session and Cookie in Tomcat

Preface HTTP is a stateless communication protoco...

Mysql keeps the existing content and adds content later

This command modifies the data table ff_vod and a...

About if contains comma expression in JavaScript

Sometimes you will see English commas ",&quo...

XHTML Web Page Tutorial

<br />This article is mainly to let beginner...

How to bind Docker container to external IP and port

Docker allows network services to be provided by ...

CSS3 realizes the red envelope shaking effect

There is a requirement to realize the shaking eff...

Detailed example of using js fetch asynchronous request

Table of contents Understanding Asynchrony fetch(...

The iframe frame sets the white background to transparent in IE browser

Recently, I need to frequently use iframe to draw ...

MySQL multi-master and one-slave data backup method tutorial

Overview Operations on any one database are autom...